69,371
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
using namespace std;
int main()
{
//char b[]={'a','s','d','f'};
char b[]={'a','s','d','f','\0'};//添加'\0'结束符
cout << b <<endl; //输出时找不到字符串结束符
return 0;
}
#include <iostream>
using namespace std;
int main()
{
char b[]={'a','s','d','f','\0'};
cout <<b <<endl;
}
#include <iostream>
using namespace std;
int main()
{
char b[]={'a','s','d','f','\0'};
cout <<b <<endl;
}