printf(\ n=1;
while (n { printf(\ } } printf(\总个数为: %d\\n\ } 1、程序改错题 gc165.c 程序中的函数find_str()用来返回字符串s2在字符串s1中第一次出现的首地址;如果字符串s2不是s1的子串,则该函数返回空指针NULL。 现在程序中发现有两个错误,错误就出现在那些注释行的附近,请你找出错误并将它们改正过来,要求在调试过程中不允许改变程序结构,更不得增删语句。 #include char *find_str(char *s1,char *s2) { int i,j,ls2; ls2=strlen(s2); for(i=0;i<=strlen(s1)-ls2;i++) { for(j=0;j return NULL; } void main() { char *a=\ windows98 office2000\ /* .............. comment two .............. */ c=find_str(a,b); if(c!=NULL)printf(\ else printf(\未找到字符串%s\\n\ } 2、程序填空题 tk165.c 程序首先定义了一个结构体变量(包括年、月、日),然后从键盘上输入任意的一天(包括年月日),最后计算该日在当年中是第几天,此时当然要考虑闰年问题。 现在程序是一个不完整的程序,请你在下划线空白处将其补充完整,以便得到正确的答案,但不得增删原来的语句。 struct datetype{ int year; int month; int day; }date; main() { int i,day_sum; static day_tab[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; printf(\请输入年、月、日:\\n\ scanf(\&date.day); day_sum=0; for(i=1;i if((date.year % 4 == 0 && date.year % 100 != 0 || date.year % 400 ==0) && date.month>=3 ) // day_sum+=1; printf(\ 月%d 日是%d 年的第%d 天 &date.month, int \\n\ } 1.程序改错题 gc166.c程序的功能是:计算并输出从键盘输入的任一正整数的各位数字之和s以及各位数字之积t。 例如,当输入的正整数为237时, s的值为12,t的值为42。 请改正程序中的两个错误,使它能得出正确的结果。注意:不得增行或删行,也不得修改程序的 结构。 #include \ main() { int n, yw, s=0, t=0; scanf(\ while(n!=0) { yw=n;