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

正文內(nèi)容

c語言程序設計的練習(存儲版)

2024-09-30 15:23上一頁面

下一頁面
  

【正文】 { int i,a[20],sum=0,count=0。 } 11.以下程序可判斷輸入的一個整數(shù)是否能被 3 或 7 整除,若能整除,輸出“ yes” 并換行,否則輸出“ no” 。k%7==0)_________ printf(“yes \n ”)。 scanf(“%d”,amp。int i,t=0。 else return(no!)。 main( ) { int m,n,r。 m=n。 if ( _ year%4==0_ amp。 include main() { struct human { char name[20]。)。 }。pmath,amp。 char *name。,70},{103,jack,39。 } 第四部分:讀程序?qū)懡Y(jié)果 1. include main() { int x=1,a=0,b=0。 int b[8]={15,20,35,45,10,65,75,85}。 } 當輸入 10 時,程序的運行結(jié)果是__________15_________。 printf(p2p1=%x\n,p2p1)。 printf(“%d\n”,fun1(x,y))。i7。printf(%d % d %d\n,i,j,k)。scanf(%d,amp。 } 9. 以下程序運行后的輸出結(jié)果是 ___4 3 3 4 ___ void swap(int x,int y) { int t。 } 10.以下 程序運行后的輸出結(jié)果是 ________3______. int f(int n) { if (n==1) return 1。 if(n= =1 || n= =2) s=2。 if(i3){i+=2。} 13.以下 程序運行后的輸出結(jié)果是 _____2, 1________. include void swap2(int x[ ]) { int z。 int *p=amp。 } 15. void main() { char str[80]。z39。 }。 int i,sum=0。 }men[3]={{101,39。 p=men。 int *p。i++) for(j=0。 else printf(%dA%dB\n,a,b)。,39。 } while(j=8amp。 scanf(%d,amp。 } 8.編寫統(tǒng)計候選人得票的程序,設有三個候選人,每次輸入一個得票的候選人的名字,要求最后輸出每個候選人的得票結(jié)果。 while((*s)!=NULL) {for(i=0。} } include include void fun(char name[3][20],int num[],char s[]) { int i。i++) gets(name[i])。i++) printf(\n%s:\t%d,name[i],num[i])。i3。 for(i=0。} for(i=0。i++) if(s[i]!=c) s[j++]=s[i]。 fun(s,c)。 printf(please input c: )。s[i]!=39。i++) if(strcmp(s,name[i])==0) num[i]++。 } include include main( ) { int num[3]={0},i。 gets(s)。 } for(i=0。 for(i=0。 printf(please input leader_name:)。 printf(please input leader_name:)。 if (j=m) printf(YES\n)。 參考答案: include main( ) { int j,m,k。 k=guess(p,q)。,39。 b=ba。 /*a 代表 A 的個數(shù), b 代表 B 的個數(shù) */ for(i=0。 4.用函數(shù)調(diào)用的方式,判斷一個數(shù)是否是素數(shù)。,45}}。 char sex。f39。 char sex。amp。a。 printf(a[0]=%d, a[1]=%d\n,a[0],a[1])。 func1(i)。 char st[]=hello,friend!。 printf(“%d \n”,j)。 swap(a,b)。b=b*2。 } 8. 已知字符 A的 ASCII代碼值為 65,以下程序運行時若從鍵盤輸入 :B33回車 .則 輸出結(jié)果是 __1 B ___ include main() {char a,b。j,amp。q=b。 return c1+c2。 p2=p1+5。i++) if(a[i]==n) n=b[i]。 } 程序的運行結(jié)果是 ______ a=2 b=1_____________。i++) { sum+=___stu[i].score____。,45},{102,peter,39。 printf(%4d\n,(*p).sum)。 scanf(%d,%d,%d,amp。 int puter。 scanf(%s %c %d,amp。 else printf(%d is not a leap year \n, year)。 scanf(%d, amp。 n=r。結(jié)構化程序設計規(guī)定的三種基本結(jié)構是__順序 __ 、 __選擇 __和 ___循環(huán) ___ 結(jié)構。break。 } printf(“i=%4d j=%4d \n”,i,j)。 printf(“Enter INT numbers,with 0 to end\n”)。 if_______(k%3==0amp。 count++。 data[k]=temp。 for(i=0。 long i。n)。j__ M __。 } for(i=0。 printf(“%d,%o,%x,%u\n”, a,a,a,a)。 54.( 對 ) C 語言中不能對數(shù)組名進行加減和賦值運算。 46. (對 )計算函數(shù)參數(shù)順序引起的二義性,完全是由不同編譯系統(tǒng)確定。不能放在開頭和中間。 32. (對 ) 就是地址,因此一個變量的指針就是該變量的地址。 24. ( 錯 ) ar a[]={0,1,2,3,4,5,6}不是正確的數(shù)組說明語句。 17. ( 對 )程序中所用的變量必須先定義后使用。 9.( 對 ) C 語言允許局部變量與全局變量同名。 A) B)b[2].num C ) D) 第二部分:判斷題 1. ( 對 )任何字符常量與一個任意大小的整數(shù)進行加減都是有意義的。 int score。i++) scanf(%f,amp。}。,39。 D. E. float key[]={,1,0}。 A) register B) auto C) extern D) static 81.下列標識中,( C)是文件級作用域的。 A) void B) 任意 C) int D) 無 78.在函數(shù)返回值類型與返回表達式的類型的描述中,( C )是錯誤的。amp。 putchar(c2)。 A) void,define,word B) a3_b3,_123,sum C) for,—— abc,case D) 2a,do,sizeof 63. C 語言中最簡單的數(shù)字類型包括 (B) A) 整型 ) 實型 ) 邏輯型 B) 整型 ) 實型 ) 字符型 C) 整型 ) 字符型 ) 邏輯型 D) 整型 ) 實型 ) 邏輯型 ) 字符型 64. c 語言中合法的字符常量是 (B) A) ’ \084’ B) ’ \x43’ C) ’ab’ D) “ \0” 65.當 把以下四個表達式用做 IF 語句的控制表達式時,有一個選項與其它三個選項含義不同,這個選項是( D) A) K%2 B)K%2==1 C) K%2)! =0 D)! K%2==1 66.以下能正確定義且賦初值的語句是( B) A) int n1=n2=10。 A) 4 B) 8 C) 16 D) 32 54. 表達式: 10! =9 的值是 (A) 。A39。 50.在 C 語言中, while 語句中的條件為( A)時,結(jié)束該循環(huán)。p=1。 A)for(i=1,p=1。(c!=5) C) (c==1)amp。 46.為表示關系 x≤ y≤ z,正確的 C 語言表達式是( A)。 A) scanf(%d%s,amp。a,%b,%c) 。 A) 0 B) 028 C) 077 D)01 40. 若要求在 if 后一對圓括號中表示 a 不等于 0 的關系,則能正確表示這一關系的表達式為( D)。stu。 continue。 int fun(char *x) { char *y=x。 main( ) { int a[2]={0},i,j,k=2。 C) int b[ ][ ] ={1,2,3,4,5,6}。} else z=1。} B) 。 A)算術運算 ) 賦值運算 ) 關系運算 B)關 系運算 ) 賦值運算 ) 算術運算 C)算術運算 ) 關系運算 ) 賦值運算 D)關系運算 ) 算術運算 ) 賦值運算 17. 將關系 a≥ b≥ c,使用 C 語言表達式表示是( B)。 C) ! D) ~ 13. 以下說法中正確的是( C)。 A) E5 B) .35 C) 3E5 D) 3E5 7. 下列變量中,( A )是合法的。 A) 連接符 B) 下劃線 C) 大小寫字母 D) 數(shù)字字符 2.下列符號中,( C )不可作為分隔符。a, *p 的值是( D )。 C) C 語言程序總是從 main()函數(shù)開始執(zhí)行。( b≥ c) C)( a≥ b) AND( b≥ c) D)( a≥b) amp。 A) x==0 B) x==1 C) x != 0 D) x != 1 20. 設有定義語句: char b=’\123’;則變量 b( D)。 則數(shù)值為 6 的表達式是( D)。 A) )))180/*(s in(( ?xabssqr t B) ) ) )18 0/*( s in(( xab ssqr t C) ))(sin(xsqrt D) ) ) )180/*( s in(( xf ab ssqr t 27.函數(shù) strcmp(“CHINA”,“ JAPAN” )的返回值是( C)。i++) for(j=0。 } A)求字符串的長度
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1