freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

全國計算機等級考試三級c語言程序設計上機考試習題集20xx年版(編輯修改稿)

2025-07-28 21:04 本頁面
 

【文章內容簡介】 0。 sell[i].dj=atoi(ch)。 memcpy(ch,str+18,5)。ch[5]=0。 sell[i].sl=atoi(ch)。 sell[i].je=(long)sell[i].dj*sell[i].sl。 } fclose(fp)。 } void WriteDat(void) { FILE *fp。 int i。 fp=fopen(,w)。 for(i=0。i100。i++){ printf(%s %s %4d %5d %5d\n, sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je)。 fprintf(fp,%s %s %4d %5d %5d\n, sell[i].dm,sell[i].mc,sell[i].dj,sell[i].sl,sell[i].je)。 } fclose(fp)。 } ***************************★ 題目 8(無憂 id 83 題 ) 函數 ReadDat()實現(xiàn)從文件 中讀取一篇英文文章,存入到字符串數組 xx 中;請編制函數 encryptChar(),按給定的替代關系對數組 xx 中的所有字符進行替代,仍存入數組 xx 的對應的位置上,最后調用函數WriteDat()把結果 xx 輸出到文件 中。 替代關系: f(p)=p*11 mod 256( p 是數組中某一個字符的ASCII 值, f(p)是計算后新字符的 ASCII 值),如果計算后 f(p)值小于 等于 32 或大于 130,則該字符不變,否則將 f(p)所對應的字符進行替代。部分源程序存在文件 中。原始數據文件存放的格式是:每行的寬度均小于 80 個字符。 請勿改動主函數 main()、讀數據函數 ReadDat()和輸出數據函數 WriteDat()的內容。 include include include include unsigned char xx[50][80]。 int maxline=0。/*文章 的總行數 */ int ReadDat(void)。 void WriteDat(void)。 void encryptChar() { int i,j。 for(i=0。imaxline。i++) for(j=0。jstrlen(xx[i])。j++) if(xx[i][j]*11%256=32||xx[i][j]*11%256130) continue。 else xx[i][j]=xx[i][j]*11%256。 } void main() { clrscr()。 if(ReadDat()){ printf(數據文件 不能打開! \n\007)。 return。 } 全國計算機等級考試三級 C 語言程序設計上機考試習題集( 20xx 年版)【終極無錯版】 6 encryptChar()。 WriteDat()。 } int ReadDat(void) { FILE *fp。 int i=0。 unsigned char *p。 if((fp=fopen(,r))==NULL) return 1。 while(fgets(xx[i],80,fp)!=NULL){ p=strchr(xx[i],39。\n39。)。 if(p)*p=0。 i++。 } maxline=i。 fclose(fp)。 return 0。 } void WriteDat(void) { FILE *fp。 int i。 fp=fopen(,w)。 for(i=0。imaxline。i++){ printf(%s\n,xx[i])。 fprintf(fp,%s\n,xx[i])。 } fclose(fp)。 } ***************************★ 題目 9(無憂 id 28; id 124題;捷成 id 16 題 ) 函數 ReadDat()實現(xiàn)從文件 中讀取一篇英文文章存入到字符串數組 xx 中,請編制函數 SortCharD(),其函數的功能是:以行為單位對字符按從大到小的順序進行排序,排序后的結果仍按行重新存入字符串數組 xx 中,最后調用函數writeDat()把結果 xx 輸出到文件 中。 例:原文: dAe,BfC. CCbbAA 結果: fedCBA. bbCCAA 原始數據文件存放的格式是:每行的寬度均小于 80 個字符,含標點符號和空格。 部分源程序存在文件 中。 請勿改動主函數 main()、讀數據函數 ReadDat()和輸出數據函數 writeDat()的內容。 include include include char xx[50][80]。 int maxline=0。/*文章的總行數 */ int ReadDat(void)。 void WriteDat(void)。 void SortCharD(void) {int I,j,k,strl。 char ch。 for(I=0。Imaxline。I++) {strl=strlen(xx[I])。 for(j=0。jstrl1。j++) for(k=j+1。kstrl。k++) if(xx[I][j]xx[I][k]) {ch=xx[I][j]。 xx[I][j]=xx[I][k]。 xx[I][k]=ch。} } } void main() { clrscr()。 if(ReadDat()){ printf(數據文件 不能打開! \n\007)。 return。 } SortCharD()。 WriteDat()。 } int ReadDat(void) { FILE *fp。 int i=0。 char *p。 if((fp=fopen(,r))==NULL) return 1。 while(fgets(xx[i],80,fp)!=NULL){ p=strchr(xx[i],39。\n39。)。 if(p)*p=0。 i++。 } maxline=i。 fclose(fp)。 return 0。 } void WriteDat(void) { FILE *fp。 int i。 fp=fopen(,w)。 for(i=0。imaxline。i++){ printf(%s\n,xx[i])。 fprintf(fp,%s\n,xx[i])。 } fclose(fp)。 } ***************************題目 10(無憂 id 68 題 ) 函數 ReadDat()實現(xiàn)從文件 中讀取一篇英文文章存入到字符串數組 xx 中,請編制函數 ConvertCharA(),其函數的功能是:以行為單位把字符串中的所有小寫字母改寫成該字母的下一個字母,如果是字母z,則改寫成字母 a。大寫字母仍為大寫字母,小寫字母仍為小寫字母,其他字符不變。把已處理的字符串仍按行重新存入字符串數組 xx 中,最后調用函數 writeDat()把結果 xx 輸出到文件 中。 例:原文: 結果: 原始數據文件存放的格式是:每行的寬度均小于 80 個字符,含標點符號和空格。 部分源程序存在文件 中。 請勿改動主函數 main()、讀數據函數 ReadDat()和輸出數據函數 writeDat()的內容。 include include include char xx[50][80]。 int maxline=0。/*文章的總行數 */ int ReadDat(void)。 void WriteDat(void)。 全國計算機等級考試三級 C 語言程序設計上機考試習題集( 20xx 年版)【終極無錯版】 7 void ConvertCharA(void) { int i,j。 for(i=0。imaxline。i++) { for(j=0。jstrlen(xx[i])。j++) if(xx[i][j]==39。z39。) xx[i][j]=39。a39。 else if(xx[i][j]=39。a39。amp。amp。xx[i][j]=39。y39。) xx[i][j]+=1。 } } void main() { clrscr()。 if(ReadDat()){ printf(數據文件 不能打開! \n\007)。 return。 } ConvertCharA()。 WriteDat()。 } int ReadDat(void) { FILE *fp。 int i=0。 char *p。 if((fp=fopen(,r))==NULL) return 1。 while(fgets(xx[i],80,fp)!=NULL){ p=strchr(xx[i],39。\n39。)。 if(p)*p=0。 i++。 } maxline=i。 fclose(fp)。 return 0。 } void WriteDat(void) { FILE *fp。 int i。 clrscr()。 fp=fopen(,w)。 for(i=0。imaxline。i++){ printf(%s\n,xx[i])。 fprintf(fp,%s\n,xx[i])。 } fclose(fp)。 } ***************************題目 11(無憂 id 93 題 ) 程序 的功能是:把 s 字符串中的所有字母改寫成該字母的下一個字母,字母 z 改寫成字母 a。要求大寫字母仍為大寫字母,小寫字母仍為小寫字母,其它字符不做改變。 請考生編寫函數 chg(char *s)實現(xiàn)程序要求,最后調用函數 readwriteDAT( )把結果輸出到文件 中。 例如: s 字符串中原有的內容為: ,則調用該函數后,結果為: 。 注意:部分源程序存在文件 文件中。 請勿改動主函數 main( )和輸出數據函數 readwriteDAT()的內容。 include include include include define N 81 void readwriteDAT()。 void chg(char *s) {while(*s) if(*s==39。z39。||*s==39。Z39。) {*s=25。 s++。} else if(*s=39。a39。amp。amp。*s=39。y39。) {*s+=1。s++。} else if(*s=39。A39。amp。amp。*s=39。Y39。) {*s+=1。s++。} else s++。 } main( ) { char a[N]。 clrscr()。 printf(Enter a string : )。 gets(a)。 printf(The original string is : )。 puts(a)。 chg(a)。 printf(The string after modified : )。 puts (a)。 readwriteDAT() 。 } void readwriteDAT() { int i 。 char a[N] 。 FILE *rf, *wf 。 rf = fopen(, r) 。 wf = fopen(, w) 。 for(i = 0 。 i 50 。 i++) { fscanf(rf, %s, a) 。
點擊復制文檔內容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1