Skip to content
Snippets Groups Projects
null_pointer_3.c 202 B
Newer Older
Andre Maroneze's avatar
Andre Maroneze committed
int y=0;
int main() {
  int *p = NULL;
  int **q = (int **) calloc(1,sizeof(int*));
  // is this guaranteed to be true?
  _Bool b = (memcmp(&p, q, sizeof(p))==0);
  printf("%s\n",b?"zero":"nonzero");
}