字符串定义
char str1[10] = {'h','e','l','l','o','\0'};
char str2[10] = {"hello"};
char str3[10] = "hello";
char str4[] = "hello";
二维数组字符定义
const char str1[2][8] = {"hello","world"};
const char *str2[2] = {"good","bye"};
二维数组字符串定义
char *str[2][3]={{"asdqwe","123asd","qwe123"},{"asdqwe","123asd","qwe123"}};
printf("%s",str[1][1]);
C语言字符串定义
最新推荐文章于 2024-03-25 11:59:50 发布