开发者

how can i read a character if I have the initial pointer of that string

I have the initial pointer of the string how can read the value in character array from that stri开发者_JAVA技巧ng.


const char *str="A C string";
printf("The first character is %c\n",*str);
printf("The second character is %c\n",*(str+1));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜