题目内容
以下程序的功能是将C语言源程序文件exam.c中用反斜杠与星号括起来的非嵌套注释删除,然后存入文件exam.out中。请填入适当内容。#includevoid delcomm(FILE *fp1,FILE *fp2){int c,i=0;while((_______)!=EOF)if(c==’\n’)fprintf(fp2,”\n”);elseswitch(i){case(0):if(c==’/’) i=1;elsefprintf(fp2,”%c”,c);break;case(1):if(c==’*’) i=2;else{fprintf(fp2,”%c”,c); i=0;}break;case(2):if(c==’*’)i=3;break;case(3):i=(c==’/’)?_______;break;}}void main(){FILE *fp1,*fp2;fp1=fopen(“exam.c”,”r”);fp2=fopen(“exam.out”,”w”);delcomm(______);fcloseall();}
查看答案
搜索结果不匹配?点我反馈
更多问题