课堂作业补充

#include<stdio.h>
int main()
{    void funstr(char str[12]);
     char str[12]={"hello world"};
     char *i=str;
     str[0]='H';
     funstr(i);
     return 0;
} 
void funstr(char str[12])
{
    int t=0;
    printf("%s\n",str);
    while(str[t]!='\0')
    {
        printf("%c",str[t]);
        t++;
    }
}
Hello world
Hello world
--------------------------------
Process exited after 0.5695 seconds with return value 0
请按任意键继续. . .

 

posted on 2017-03-31 17:53  员始猿  阅读(85)  评论(0编辑  收藏  举报