字符串问题一则

mac2022-06-30  91

#include <stdio.h> #include <string.h> #include <iostream.h> void main() {  char str1[512]="test "; //  str1[0]=0;  char str2[512]="abc";  strcat(str1,str2);      cout<<str1<<end #include <stdio.h> #include <string.h> #include <iostream.h> void main() { char str1[512]="test "; // str1[0]=0; char str2[512]="abc"; strcat(str1,str2); cout<<str1<<endl; }

倘若启用被注释的一行,输出结果是什么呢?

转载于:https://www.cnblogs.com/HelloCpp/archive/2010/05/08/1730395.html

最新回复(0)