diff --git a/ex8.c b/ex8.c index e89e124..b7efc4b 100644 --- a/ex8.c +++ b/ex8.c @@ -10,10 +10,10 @@ int main(int argc, char *argv[]) 'S', 'h', 'a', 'w', '\0' }; - printf("The size of an int: %d\n", sizeof(int)); - printf("The size of areas (int[]): %d\n", + printf("The size of an int: %ld\n", sizeof(int)); + printf("The size of areas (int[]): %ld\n", sizeof(areas)); - printf("The number of ints in areas: %d\n", + printf("The number of ints in areas: %ld\n", sizeof(areas) / sizeof(int)); printf("The first area is %d, then 2nd %d.\n", areas[0], areas[1]); @@ -22,15 +22,15 @@ int main(int argc, char *argv[]) printf("Now the first area is %d and the 3rd area is %d.\n", areas[0], areas[2]); - printf("The size of char: %d\n", sizeof(char)); - printf("The size of name (char[]): %d\n", + printf("The size of char: %ld\n", sizeof(char)); + printf("The size of name (char[]): %ld\n", sizeof(name)); - printf("The number of chars: %d\n", + printf("The number of chars: %ld\n", sizeof(name) / sizeof(char)); - printf("The size of full_name (char[]): %d\n", + printf("The size of full_name (char[]): %ld\n", sizeof(full_name)); - printf("The number of chars: %d\n", + printf("The number of chars: %ld\n", sizeof(full_name) / sizeof(char)); printf("name=\"%s\" and full_name=\"%s\"\n",