Source:
#include <stdio.h>
#include <ctype.h>
void main()
{
char a[]="this is the beautiful world!";
char b[20];
strcpy(b,a);
printf("char array b size is(%d),The content of b
is:%s\n",sizeof(b),b);
if(strcmp(a,b)==0)
printf("a equal to b!\n");
}
Now , question as follows:
1. Why "b" size unequal "a" size , but "b" can output "a" content?
2. Why "if(strcmp(a,b)==0)" is true?


|