我认为a
完全等于b
。但跑步的结果证明我错了。我错误地理解哪一部分?我很难理解类型字符
下面的代码:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char a[] = "abcdefg";
char b[] = {'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g'};
printf("%s\n" , a);
printf("%s\n" , b);
system("pause");
return 0;
}
您应该包含程序的输出 – Zags