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

正文內(nèi)容

二級(jí)c語言題庫-文庫吧

2025-07-04 12:19 本頁面


【正文】 ntf(Input a b:)。 scanf(%d%d, amp。a, amp。b)。 fun(a, b, amp。c)。 printf(The result is: %ld\n, c)。 NONO()。 } void NONO ( ) {/* 本函數(shù)用 于打開文件,輸入數(shù)據(jù),調(diào)用函數(shù),輸出數(shù)據(jù),關(guān)閉文件。 */ FILE *rf, *wf 。 int i, a,b 。 long c 。 rf = fopen(K:\\k01\\24010001\\, r) 。 wf = fopen(K:\\k01\\24010001\\,w) 。 for(i = 0 。 i 10 。 i++) { fscanf(rf, %d,%d, amp。a, amp。b) 。 fun(a, b, amp。c) 。 fprintf(wf, a=%d,b=%d,c=%ld\n, a, b, c) 。 } fclose(rf) 。 fclose(wf) 。 } 第 4 套題 一、程序填空題 include include int fun(char *source, char *target) { FILE *fs,*ft。 char ch。 /**********found**********/ if((fs=fopen(source, ___’r”1___))==NULL) return 0。 if((ft=fopen(target, w))==NULL) return 0。 printf(\nThe data in file :\n)。 ch=fgetc(fs)。 /**********found**********/ while(!feof(___2___)) { putchar( ch )。 /**********found**********/ fputc(ch,___3___)。 ch=fgetc(fs)。 } fclose(fs)。 fclose(ft)。 printf(\n\n)。 return 1。 } main() { char sfname[20] =myfile1,tfname[20]=myfile2。 FILE *myf。 int i。 char c。 myf=fopen(sfname,w)。 printf(\nThe original data :\n)。 for(i=1。 i30。 i++){ c=39。A39。+rand()%25。fprintf(myf,%c,c)。 printf(%c,c)。 } fclose(myf)。printf(\n\n)。 if (fun(sfname, tfname)) printf(Succeed!)。 else printf(Fail!)。 } 二、程序改錯(cuò)題 include void fun (long s, long *t) { int d。 long sl=1。 *t = 0。 while ( s 0) { d = s%10。 /************found************/ if (d%2=0) { *t=d* sl+ *t。 sl *= 10。 } /************found************/ s \= 10。 } } main() { long s, t。 printf(\nPlease enter s:)。 scanf(%ld, amp。s)。 fun(s, amp。t)。 printf(The result is: %ld\n, t)。 } 三、程序編寫題 include include void fun(char *s, char t[]) { } main() { char s[100], t[100]。 void NONO ( )。 printf(\nPlease enter string S:)。 scanf(%s, s)。 fun(s, t)。 printf(\nThe result is: %s\n, t)。 NONO()。 } void NONO ( ) {/* 本函數(shù)用于打開文件,輸入數(shù)據(jù),調(diào)用函數(shù),輸出數(shù)據(jù),關(guān)閉文件。 */ char s[100], t[100] 。 FILE *rf, *wf 。 int i 。 rf = fopen(K:\\k01\\24010001\\,r) 。 wf = fopen(K:\\k01\\24010001\\,w) 。 for(i = 0 。 i 10 。 i++) { fscanf(rf, %s, s) 。 fun(s, t) 。 fprintf(wf, %s\n, t) 。 } fclose(rf) 。 fclose(wf) 。 } 第 5 套題 一、程序填空題 include include define N 8 typedef struct list { int data。 struct list *next。 } SLIST。 void fun( SLIST *h, int x) { SLIST *p, *q, *s。 s=(SLIST *)malloc(sizeof(SLIST))。 /**********found**********/ sdata=___1___。 q=h。 p=hnext。 while(p!=NULL amp。amp。 xpdata) { /**********found**********/ q=___2___。 p=pnext。 } snext=p。 /**********found**********/ qnext=___3___。 } SLIST *creatlist(int *a) { SLIST *h,*p,*q。 int i。 h=p=(SLIST *)malloc(sizeof(SLIST))。 for(i=0。 iN。 i++) { q=(SLIST *)malloc(sizeof(SLIST))。 qdata=a[i]。 pnext=q。 p=q。 } pnext=0。 return h。 } void outlist(SLIST *h) { SLIST *p。 p=hnext。 if (p==NULL) printf(\nThe list is NULL!\n)。 else { printf(\nHead)。 do { printf(%d,pdata)。 p=pnext。 } while(p!=NULL)。 printf(End\n)。 } } main() { SLIST *head。 int x。 int a[N]={11,12,15,18,19,22,25,29}。 head=creatlist(a)。 printf(\nThe list before inserting:\n)。 outlist(head)。 printf(\nEnter a number : )。 scanf(%d,amp。x)。 fun(head,x)。 printf(\nThe list after inserting:\n)。 outlist(head)。 } 二、程序改錯(cuò)題 include long fun (long num) { /************found************/ long k。 do { k*=num%10 。 /************found************/ num\=10 。 } while(num) 。 return (k) 。 } main( ) { long n 。 printf(\nPlease enter a number:) 。 scanf(%ld,amp。n) 。 printf(\n%ld\n,fun(n)) 。 } 三、程序編寫題 include float fun ( float *a , int n ) { } main() { float score[30]={, 72, 80, , 55}, aver。 void NONO ( )。 aver = fun( score, 5 )。 printf( \nAverage score is: %\n, aver)。 NONO ( )。 } void NONO ( ) {/* 本函數(shù)用于打開文件,輸入數(shù)據(jù),調(diào)用函數(shù),輸出數(shù)據(jù),關(guān)閉文件。 */ FILE *fp, *wf 。 int i, j 。 float aver, score[5] 。 fp = fopen(K:\\k01\\24010001\\,r) 。 wf = fopen(K:\\k01\\24010001\\,w) 。 for(i = 0 。 i 10 。 i++) { for(j = 0 。 j 5 。 j++) fscanf(fp,%f,amp。score[j]) 。 aver = fun(score, 5) 。 fprintf(wf, %\n, aver) 。 } fclose(fp) 。 fclose(wf) 。 } 第 6 套題 一、程序填空題 include include define N 8 typedef struct list { int data。 struct list *next。 } SLIST。 void fun( SLIST *p) { SLIST *t, *s。 t=pnext。 s=p。 while(tnext != NULL) { s=t。 /**********found**********/ t=t___1___。 } /**********found**********/ printf( %d ,___2___)。 snext=NULL。 /**********found**********/ free(___3___)。 } SLIST *creatlist(int *a) { SLIST *h,*p,*q。 int i。 h=p=(SLIST *)malloc(sizeof(SLIST))。 for(i=0。 iN。 i++) { q=(SLIST *)malloc(sizeof(SLIST))。 qdata=a[i]。 pnext=q。 p=q。 } pnext=0。 return h。 } void outlist(SLIST *h) { SLIST *p。 p=hnext。 if (p==NULL) printf(\nThe list is NULL!\n)。 else { printf(\nHead)。 do { printf(%d,pdata)。 p=pnext。 } while(p!=NULL)。 printf(End\n)。 } } main() { SLIST *head。 int a[N]={11,12,15,18,19,22,25,29}。 head=creatlist(a)。 printf
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1