【正文】
fprintf(fp,\nMy number is:1292340\n)。 fprintf(fp,%d ,a[i])。t open the file!)。 for(j=0。 } return w。 case 1: w=(y/10)%10。ik。 strcpy(str,str+i+1)。 while(str[i]!=39。 2020秋 上機題 _C01 第 3 頁 共 4 頁 【改錯題解答: 】 此題比較簡單。函數 功能 : 聲明數組 a 和 b,, 用 a、 b 作實參調用 sxh函數, 將 a、 b 數組中全部數據輸出到屏幕 及數據文件 中。 } 【要求】 1. 打開 T 盤中 文件或將上述程序錄入到 文件中 ,根據題目要求及程序中語句之間的邏輯關系對程序中的錯誤進行修改。 char pag[40][21]。ji。amp。 【 測試數據與運行結果 】 測試 數據 : A great discovery solves a great problem. 屏幕輸出: A great discovery solves a great problem. 【 含有錯誤的源程序 】 以下源程序已保存在 T 盤 文件內,考生可直接打開該文件測試程序。 39。 } k++。i++) puts(pag[i])。 【編程要求】 編寫函數 int sxh(int a[], int b[])。 4. 不要復制擴展名為 obj 和 exe 的文件到 T盤上。flag) { if(strlen(str)20) { strcpy(pag[k],str)。j++) pag[k][j]=str[j]。 int i,k。 include include include