char c[] = \"Hello\"; char *p = \"Hello\"; printf(\"%i\", sizeof(c)); \\\\Prints 6 printf(\"%i\", sizeof(p)); \\\\Prints 4
My question is:
Why
They don't print the same because arrays and pointers are just not the same. There's no reason why they should be the same. An array is implicitly converted to a pointer in many circumstances, but this doesn't make them identical.