int main(int argc, char *argv[]) { char a[] = "12"; //with end character '\0' printf("The number of bytes in a is: %d\n", sizeof(a)); char b[] = { '1', '2', '3' }; printf("The number of bytes in b is: %d\n", sizeof(b)); system("pause"); return 0; }
operation result: