breaking stuff and futzing with null

This commit is contained in:
Dan Buch 2011-09-05 21:03:40 -04:00
parent 5328793953
commit 3b34c6ce0d

6
ex7.c
View File

@ -26,5 +26,11 @@ int main(int argc, char *argv[])
printf("Which means you should care %d%%.\n", printf("Which means you should care %d%%.\n",
care_percentage); care_percentage);
puts("also...");
int nul = (int)nul_byte;
int *nul_ptr = &nul;
printf("char '\\0' = '%c', (int)'\\0' = '%d', &(int)'\\0' = '%n'.\n",
nul_byte, nul, nul_ptr);
return 0; return 0;
} }