- #include
- #include
- #include<string.h>int main()
- {
- charstr[]={"hello world"};
- voidfunstr(char str[]);
- str[0]='H';
- str[6]='W';
- funstr(str);
- system("pause");
- return 0;
- }
- voidfunstr(char a[])
- {
- int i;
- printf("%s\n",a);
- for(i=0;i)
- {
- printf("%c",a[i]);
- }
- }
来源: http://www.bubuko.com/infodetail-2003531.html