-
定义数组
数组名[常量]。其中,‘常量’可以用规定了数值的变量。
(1)数组的名是指针变量,指向首地址。 -
字符串函数
(1)拼接
int main()
{
char a[100]="hello";
char b[100]="world";
strcat(a,b);
printf("%s",a);
return 0;
}
运行结果:
helloworld
定义数组
数组名[常量]。其中,‘常量’可以用规定了数值的变量。
(1)数组的名是指针变量,指向首地址。
字符串函数
(1)拼接
int main()
{
char a[100]="hello";
char b[100]="world";
strcat(a,b);
printf("%s",a);
return 0;
}
运行结果:
helloworld