#include<stdio.h>
#include<string.h>
int main(){
char str1[100],str2[100];
//从键盘获取字符串
gets(str1); //不能写成gets(str1,str2)的格式
gets(str2);
//连接两个字符数组把2接到串1的后面
printf("连接两个字符串%s\n",strcat(str1,str2));
//将2复制到1,str1必须是数组名2可以是数组名可以常量
printf(“将串1复制到串2后的串为%s\n”,strcpy(str1,str2));
//比较两个字符串长度
if(strcmp(str1,str2)>0){ //*不能 strcmp(str1>str2)>0
printf("yes\n");
}
else printf("NO\n");
//输出字符串长度
printf("字符串长度为%d%d\n",strlen(str1),strlen(str2));
printf("str1大写换小写%s\nstr2大写换小写%s\n",strlwr(str1),strlwr(str2));
printf("str1小写换大写%s\nstr2小写换大写%s\n",strupr(str1),strupr(str2));
}