Skip to content

Instantly share code, notes, and snippets.

@titouanc
Last active December 16, 2015 20:48
Show Gist options
  • Select an option

  • Save titouanc/5494643 to your computer and use it in GitHub Desktop.

Select an option

Save titouanc/5494643 to your computer and use it in GitHub Desktop.
int a = 3; /* Variable de type "int", qui vaut 3 */
int *p = &a; /* Variable de type "pointeur sur int", qui vaut l'adresse de a (ex: 0xffffff58) */
int *n = NULL; /* Variable de type "pointeur sur int", initialisée à NULL (pointeur vide) */
/*
En pratique, dans stdlib.h, on a
#define NULL (void*)0
C'est à dire un pointeur générique (void *) vers l'adresse 0 de la mémoire.
Tenter dy accéder fera planter le programme.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment