問題詳情
27)有以下程序int f(int n){ if(n==1)return 1;else return f(n-1)+1;}main(){ int i,j=0;for(i=1;i<3;i++)j+=f(i);printf("%dn",j);}程序运行后的输出结果是
(A)4
(B)3
(C)2
(D)1
(A)4
(B)3
(C)2
(D)1
參考答案
答案:B
難度:適中0.5
統計:A(0),B(0),C(0),D(0),E(0)
內容推薦
- 膽汁中的何種成分具有乳化脂肪的作用(A)膽固醇(B)膽鹽(C)膽紅素(D)膽黃素
- (A)food (B)jewels (C)money (D)seeds
- According to the text,what was the author determined to do in that autumn?(A).To get a well-p
- 50.Where did Irene Curie meet her husband Frederio joliot?(A)At the Curie Institute.(B)At the Cn
- (A)whether (B)how (C)where (D)when
- 19)在C语言中,函数返回值的类型最终取决于(A)函数定义时在函数首部所说明的函数类型 (B)return语句中表达式值的类型 (C)调用函数时主调函数所传递的实参类型 (D)函数定义时形参
- Why did the mother renew her membership in the league?(A)To help with her husband’s business
- BMost people know that Marie Curie was the first woman to win the Nobel Prize, and the first person
- (A)village (B)land (C)field (D)road
- 12)以下叙述中错误的是(A)计算机不能直接执行用C语言编写的源程序 (B)C程序经C编译程序编译后,生成后缀为.obj的文件是一个二进制文件(C)后缀为.obj的文件,经连接程序生成后缀为
內容推薦
- 51.When was the second child of Irene Curie and Frederic Joliot born? (A)In 19(B)In 19(C
- DEver since they were first put on the market in the early 1990s, gentically mondified (GM, 转基因) foo
- What does the underlined word “boost ” in the third paragraph probably mean?(A)Control. (B)E
- GM companies promise farmers that they will benefit from ______________.(A)practicing “green
- 35)以下合法的字符型常量是(A)′x13′ (B) ′81′ (C) ′65′ (D)"n"
- Which of the following best describes the attitude of the author towards GM technology?(A)Op
- 36)有以下语句,则对a数组元素的引用不正确的是int a[10]={0,1,2,3,4,5,6,7,8,9},*p=a;(A)a[p-a] (B)*(&a[i]) (C)p[i] (D)*
- 28)当运行以下程序时,从键盘输入AhaMA(空格)Aha,则下面程序的运行结果是#includemain(){ char s[80],c=′a′;int i=0;scanf("%
- 15)以下定义语句中正确的是(A)int a=b=0; (B)char A=65+1,b=′b′; (C)float a=1,*b=&a,*c=&b; (D)double a=0.0;b
- 37)有以下程序# include main(){char p[20]={′a′, ′b′, ′c′, ′d′}, q[]="abc", r[]="abcde&
- 7)下列关于栈的叙述正确的是(A)栈按"先进先出"组织数据 (B)栈按"先进后出"组织数据 (C)只能在栈底插入数据 (D)不能删除数据
- 25)设有如下程序段char s[20]="Beijing",*p;p=s;则执行p=s;语句后,以下叙述正确的是(A)可以用*p表示s[0] (B)s数组中元素的个数
- 29)下面程序输出的结果是main(){ int i;int a[3][3]={1,2,3,4,5,6,7,8,9};for(i=0;i<3;i++)printf("%d &
- 16)有以下程序段char ch; int k;ch=′a′; k=12;printf("%c,%d,",ch,ch,k); printf("k=%dn&quo
- 26)若有定义:int a[2][3];,以下选项中对a数组元素正确引用的是(A)a[2][!1] (B)a[2][3] (C)a[0][3] (D)a[1>2][!1]
- 30)现有如下程序段#include "stdio.h"main(){ int a[5][6]={23,3,65,21,6,78,28,5,67,25,435,76,8,
- 17)已知字母A的ASCII码值为65,若变量kk为char型,以下不能正确判断出kk中的值为大写字母的表达式是(A)kk>=′A′&& kk=′A′||kk=′a′&&(kk+32)
- 39)以下程序的输出结果是main(){ int c=35; printf("%dn",c&C);}(A)0 (B)70 (C)35 (D)1
- 9)有三个关系R、S和T如下:RBCDa0k1b1n1SBCDf3h2a0k1n2x1TBCDa0k1由关系R和S通过运算得到关系T,则所使用的运算为 (A)并 (B)自然连接 (C)笛卡尔
- 27)有定义语句:char s[10];,若要从终端给s输入5个字符,错误的输入语句是(A)gets(&s[0]); (B)scanf("%s",s+1); (C)get
- 請問社會工作間接服務方法是下列那一種組合?(A)社會工作研究、社會福利行政、個案管理(B)社會工作研究、社會福利行政、社會運動(C)社會工作研究、個案管理、社會運動(D)社會福利行政、個
- 18)当变量c的值不为6时,值也为"真"的表达式是(A)(c==2)||(c==4)||(c==6) (B)(c>=2&& c=2&&c=2&& c<
- 40)有以下程序#include main(){ FILE *fp; int i=20,j=30,k,n;fp=fopen("ddat","w")
- 10)设有表示学生选课的三张表,学生S(学号,姓名,性别,年龄,身份证号),课程C(课号,课名),选课SC(学号,课号,成绩),则表SC的关键字 (键或码)为 (A)课号,成绩 (B)学号,
- 28)以下叙述中错误的是(A)在程序中凡是以"#"开始的语句行都是预处理命令行 (B)预处理命令行的最后不能以分号表示结束 (C)#define MAX是合法的宏定义命令