新手求教 字符串问题 运行不了
#include <stdio.h>main()
{
char cc[6];
scanf("%s",cc);
char cd[6];
scanf("%s",cd);
char ca[6]={'h','e','l','l','o','\0'};
char cb[6]="hellp";
printf("%s\n%s\n%s\n%s",ca,cb,cc,cd);
system ("pause");
}
C:\Users\书亚shua\Downloads\程序\10_1\10_1.c(6) : error C2143: syntax error : missing ';' before 'type'
C:\Users\书亚shua\Downloads\程序\10_1\10_1.c(7) : error C2065: 'cd' : undeclared identifier
C:\Users\书亚shua\Downloads\程序\10_1\10_1.c(8) : error C2143: syntax error : missing ';' before 'type'
C:\Users\书亚shua\Downloads\程序\10_1\10_1.c(9) : error C2143: syntax error : missing ';' before 'type'
C:\Users\书亚shua\Downloads\程序\10_1\10_1.c(10) : error C2065: 'ca' : undeclared identifier
C:\Users\书亚shua\Downloads\程序\10_1\10_1.c(10) : error C2065: 'cb' : undeclared identifier
C:\Users\书亚shua\Downloads\程序\10_1\10_1.c(11) : warning C4013: 'system' undefined; assuming extern returning int
Error executing cl.exe.
10_1.exe - 6 error(s), 1 warning(s)