|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 奥普瓯江 于 2017-11-24 22:34 编辑
- #include<stdio.h>
- #include<stdlib.h>
- int main(void)
- {
- char *hot1 = "nihaowoshi";
- char *hot2 = "bzhidao";
- char *hot3 = "shemeyis";
- char *hot4 = "haoniget";
- char *hot5 = NULL;
- char *cool[5];
- cool[0] = hot1;
- cool[1] = hot2;
- cool[2] = hot3;
- cool[3] = hot4;
- cool[4] = hot5;
- /*while (*(*cool) - 1 != '\0')
- {
- printf("%c", *(*cool)++);
- }*/
- char *may;
- while ((may = (*cool)++) != NULL)
- {
- while (*may != '\n')
- {
- printf("%c", *may++);
- }
- }
- return 0;
- }
复制代码 |
|