|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 奥普瓯江 于 2017-11-28 13:37 编辑
- #include<stdio.h>
- int main(void)
- {
- char *a1 = "hello";
- char *a2 = "yes konw";
- char *a3 = "name";
- char *a4 = "nihao";
- char *number[4];
- number[0] = a1;
- number[1] = a2;
- number[2] = a3;
- number[3] = a4;
- char *may;
- for (int i = 0; i < 4; i++)
- {
- may = number[i];
- while (*may != '\0' )
- {
- printf("%c\n", *may++);
- }
- putchar('\n');
- }
- return 0;
- }
复制代码
这是现在这个程序运行的结果
- #include<stdio.h>
- int main(void)
- {
- char *a1 = "hello";
- char *a2 = "yes konw";
- char *a3 = "name";
- char *a4 = "nihao";
- char *number[4];
- number[0] = a1;
- number[1] = a2;
- number[2] = a3;
- number[3] = a4;
- char *may;
- int i = 0;
- while(true)
- {
- may = number[i];
- while (*may != '\0' )
- {
- printf("%c\n", *may++);
- }
- putchar('\n');
- i++;
- if (i >= 4)
- {
- break;
- }
- }
- return 0;
- }
复制代码
|
|