1、程序填空题:
# include int j,m=strlen(t)-1; char s; for(j=0;j printf(\"Input a string:\"); gets(b); printf(\"The original string is:\"); puts(b); fun(b); printf(\"\\n\"); printf(\"The reversal string :\"); puts(b); } 2、程序改错题: # include while(*s && *s!=c) s++; /*******error*********/ if(*s=='c') { s[0]=c; /*******error*********/ s[1]='0'; } } main() { char str[81],ch; printf(\"\\n Please enter a string:\\n\"); gets(str); printf(\"\\n Please enter the character to search:\"); ch=getchar(); fun(str,ch); printf(\"\\nThe result is %s\\n\} 3、程序设计题: # include int a[M][N]={{3,5,7,9},{9,9,9,4},{9,9,9,8}}; int i,j,sum; FILE *out; printf(\"The original data is : \\n\"); for(i=0;i printf(\"\\nThe sum: %d\\n\ printf(\"\\n\"); out=fopen(\"outfile.dat\ fprintf(out,\"%d\ fclose(out); } 因篇幅问题不能全部显示,请点此查看更多更全内容