码迷,mamicode.com
首页 > 其他好文 > 详细

课堂作业补充

时间:2017-03-31 19:57:43      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:clu   独立   int   div   color   print   code   void   stdio.h   

#include<stdio.h>
int main()
{    void funstr(char str[12]);
     char str[12]={"hello world"};
     char *a=str;
     str[0]=H;
     str[6]=W; 
     funstr(a);
     return 0;
} 
void funstr(char str[12])
{
    int i=0;
    printf("%s\n",str);
    while(str[i]!=\0)
    {
        printf("%c\n",str[i]);
        i++;
    }
}
?
?
Hello World
H
e
l
l
o

W
o
r
l
d
请按任意键继续. . .
?

总结:在课上没有完成老师的作业,课下进行的补充,对于这个程序还是不太熟悉,还是应该多加练习,虽然完成作业,但也是和同学一起研究才完成的,以后自己要多加练习,争取自己能够独立编出一个程序。

课堂作业补充

标签:clu   独立   int   div   color   print   code   void   stdio.h   

原文地址:http://www.cnblogs.com/liyingzry/p/6653035.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!