What is the output for the following C program?
include<stdio.h>
int main (void) {
char* str1 = "Hello world";
char str2[] = "Hello world";
printf ("%d, %d, %d, %d\n", sizeof(str1), sizeof(str2), strlen(str1), strlen(str2));
return 0;
}
Assuming sizeof (char*) is 4 bytes (implementation-defined) the output will be:
4, 13, 12, 12