Why is the size of c being read as the size of a 32bit pointer instead of the size of the buffer it points to? What is different about the pointers?
Code:#include <stdio.h>
int main() {
char a[] = "kiera";
char b[69] = "kiera haha";
char* c = "keira rules";
printf("a = %d, b = %d, c = %d c_string = %s\n", sizeof(a), sizeof(b), sizeof(c), c);
return 0;
}
/** OUTPUT **
*
* a = 6, b = 69, c = 4, c_string = "keira rules"
*
*/