zqiang3

导航

c语言学习--字符串指针

常见的字符串的表示形式。

字符串数组

char string[] = "I love you, China!";

字符串的指针变量

char *ps = string;

char *p = "I love you, China!";

char *p;

p = "I love you, China!";

字符串指针数组

char *name[] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};

posted on 2012-10-09 08:55  zqiang3  阅读(183)  评论(0编辑  收藏  举报