c语言中定义一个字符串数组指针可以这样写:
// Example program
#include
int main()
{
char str[] = "abc";
char *p = str;
printf("%s\n", str);
printf("%s\n", p);
return 0;
}
char str[][10]={"hello" ,"world!"}; //字符串数组
char* str1[]={"hello","world","test char array"};//字符串指针数组