#include <stdio.h>
#include <string.h>
void main(){
/**
char ch[]="china\nbeijin";
char ca='a';
char c[12];
gets(c);
puts(ch);
puts(c);
*/
char ch1[30]={"china beijing"};
char ch2[]={"CaoYangQu"};
char ch3[30];
//字符數組鏈接,ch2鏈接到ch1
//strcat(ch1,ch2)
printf("%s\n",strcat(ch1,ch2));
//字符數組拷貝,ch1拷貝到ch3
//strcpy(ch3,ch1);
strcpy(ch3,ch1);
printf("%s\n",ch3);
//字符數組的比較.ch1>ch2,返回正數;ch1<ch2,返回負數;ch1=ch2,返回零
//strcmp(ch1,ch2)
printf("%d\n",strcmp(ch1,ch2));
//字符數組的長度
//strlen(ch1)
printf("%d\n",strlen(ch1));
//字符數組變小寫
//strlwr(ch2)
//字符數組變大寫
//strupr(ch2)
printf("%s\n",strlwr(ch2));
printf("%s\n",strupr(ch2));
}數組