diff options
Diffstat (limited to 'testing_strings_versus_arrays.c')
-rw-r--r-- | testing_strings_versus_arrays.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing_strings_versus_arrays.c b/testing_strings_versus_arrays.c new file mode 100644 index 0000000..c072efc --- /dev/null +++ b/testing_strings_versus_arrays.c @@ -0,0 +1,12 @@ +#include <stdio.h> + +int main(void) +{ + char* foo = "Hello World!\n"; + char bar[] = "Hello World!\n"; + + + printf("The size of char* foo is: %zu\n", sizeof(foo)); + printf("The size of char bar[] is: %zu\n", sizeof(bar)); + return 0; +} |