相关试题
【单选题】
当用户要求输入的字符串中含有空格时,应使用的输入函数是___。
A. scanf( )
B. getchar( )
C. gets( )
D. getc( )
【单选题】
if语句的控制条件是___。
A. 只能用关系表达式
B. 只能用逻辑表达式
C. 只能用关系表达式或逻辑表达式
D. 可以用任何表达式
【单选题】
以下错误的描述是___。
A. break语句不能用于循环语句和switch语句外的任何其他语句
B. 在switch 语句中使用break语句或continue语句的作用相同
C. 在循环语句中使用continue语句是为了结束本次循环,而不是终止整个循环
D. 在循环语句中使用break语句是为了使流程跳出循环体,提前结束循环
【单选题】
当把以下四个表达式用作if语句的控制表达式时,有一个选项与其它三个选项含义不同,这个选项是___。
A. k%2
B. k%2==1
C. (k%2)!=0
D. !k%2==1
【单选题】
若变量c为char类型,能正确判断出c为小写字母的表达式是___。
A. 'a'<=c<= 'z'
B. (c>= 'a')||(c<= 'z')
C. ('a'<=c)and ('z'>=c)
D. (c>= 'a')&&(c<= 'z')
【单选题】
下列条件语句中,功能与其他语句不同的是___。
A. if(a==0) printf("%d\n",x); else printf("%d\n",y);
B. if(a==0) printf("%d\n",y); else printf("%d\n",x)
C. if (a!=0) printf("%d\n",x); else printf("%d\n",y)
D. if(a) printf("%d\n",x); else printf("%d\n",y)
【单选题】
以下错误的描述是___。
A. break语句不能用于循环语句和switch语句外的任何其他语句。
B. 在switch 语句中使用break语句或continue语句的作用相同。
C. 在循环语句中使用continue语句是为了结束本次循环,而不是终止整个循环。
D. 在循环语句中使用break语句是为了使流程跳出循环体,提前结束循环。
【单选题】
for (j=0;j<10;j++);循环结束后,j的值是___。
【单选题】
下面对数组的定义正确的是 ___
A. int n=10; int array[n]
B. int array[10]
C. int n; scanf(“%d”,&n); int array[n]
D. int n; int array[n]; scanf(“%s”,array)
【单选题】
正确的数组定义语句为 ___
A. int A[-3]
B. int A[3,5]
C. int A[ ][ ]
D. int *A[3]
【单选题】
设已定义数组int array[3][4]; 则对此数组正确的引用是 ___
A. array[1,2]
B. array [1][4]
C. array[1][1+2]
D. array(1)(3)
【单选题】
设二维数组array有m列,则在array[i][j]之前的元素个数为___
A. j*m+i
B. i*m+j
C. i*m+j-1
D. i*m+j+1
【单选题】
长度为5的int类型数组和长度为3的double类型数组,哪一个数组占用内存空间多___
A. int 型的多
B. double型的多
C. 一样多
D. 不一定
【单选题】
字符数组char a[]=“one\n”;占多少内存字节___
【单选题】
下面哪个说法是错误的___
A. 数组元素有相同的名字
B. 数组元素有相同的数据类型
C. 数组元素在内存中是连续存储的
D. 数组元素有据有相同的下标
【单选题】
二维数组第一个元素的下标是___
A. 0,0
B. 0,1
C. 1,1
D. 1,0
【单选题】
若有定义 float x[3][100],下标最大的数组元素是___
A. x[2][99]
B. x[0][100]
C. x[3][99]
D. x[2][100]
【单选题】
判断字符串s1是否大于字符串s2, 则应当使用: ___
A. if(s1>s2)
B. if(strcmp(s1,s2))
C. if(strcmp(s1,s2)>0)
D. if(strcmp(s2,s1)>0)
【单选题】
下述对C语言字符数组的描述正确的是___
A. 任何一维数组的名称都是该数组存储单元的开始地址,且其每个元素按照顺序连续占用存储空间
B. 一维数组的元素在引用时其下标大小没有限制
C. 任何一个一维数组的元素,可以根据内存的情况按照其先后顺序以连续或非连续的方式占用存储
【单选题】
下述对C语言字符数组的描述中正确的是___
A. 任何一个一维数组的元素在引用时,其下标可以是整型、实型或字符型常量
B. 一维数组的元素实质上就是一个变量,代表内存中的一个存储单元
C. 如果要引用数组中的每一个元素,则直接使用该数组名称即可
D. 以上都不对
【单选题】
在一个C语言程序构成中,较完整的描述是___
A. 由主程序与子程序构成
B. 由多个主函数与多个函数构成
C. 由主函数与函数构成
D. 由一个主函数与多个函数构成
【单选题】
C语言在程序开始执行时,其正确的描述是___
A. 由编写程序语句的顺序格式执行
B. 在主函数main()开始处执行
C. 在第一个函数处执行
D. 由人随机选择执行
【单选题】
下列有关函数错误的描述是___
A. C语言中允许函数嵌套定义
B. C语言中允许函数递归调用
C. 调用函数时,实参与形参的个数、类型需完全一致
D. C语言函数的缺省数据类型是int类型
【单选题】
在C语言中,各个函数之间具有的关系是___
A. 不允许直接递归调用,也不允许间接递归调用
B. 允许直接递归调用,不允许间接递归调用
C. 不允许直接递归调用,允许间接递归调用
D. 允许直接递归调用,也允许间接递归调用
【单选题】
在C语言中,函数的返回值的类型是由___
A. C语言的编译程序,在程序编译时决定
B. 由调用该函数的主调函数所决定
C. 由return语句的表达式的类型所决定
D. 由定义该函数时指定的函数类型所决定
【单选题】
当调用函数时,如果实参是一个数组名,则向函数传送的是___
A. 数组的首元素
B. 数组的首地址
C. 数组每个元素的地址
D. 数组每个元素中的值
【单选题】
下列说法正确的是___
A. 一个函数的函数体必须要有变量定义和执行部分,二者缺一不可
B. 一个函数的函数体必须要有执行部分,可以没有变量定义
C. 一个函数的函数体可以没有变量定义和执行部分,函数可以是空函数
D. 以上都不对
【单选题】
下列说法正确的是___
A. main函数必须放在C程序的开头
B. main函数必须放在C程序的最后
C. main函数可以放在C程序的中间部分,即在一些函数之前在另一个函数之后,但在执行C程序时是从程序开头执行的
D. main函数可以放在C程序的中间部分,即在一些函数之前在另一些函数之后,但在执行C程序时是从main函数开始的
【单选题】
下列说法正确的是___
A. 在执行C程序时不是从 main函数开始的
B. C程序书写格式严格限制,一行内必须写一个语句
C. C程序书写格式自由,一个语句可以分写在多行上
D. C程序书写格式严格限制,一行内必须写一个语句,并要有行号
【单选题】
定义int*swap()指的是___
A. 一个返回整型值的函数swap()
B. 一个返回指向整型值指针的函数swap()
C. 一个指向函数swap()的指针,函数返回一个整型值
D. 以上说法均错
【单选题】
使用错误的是___
A. *(&a[0][0]+10*i+j)
B. *(a+i)+j
C. *(*(a+i)+j)
D. *(a[i]+j)
【单选题】
当定义了一个结构体变量后,系统分配给该变量分配的内存是___。
A. 结构体中各成员所需内存量的总和
B. 结构体中第一个成员所需的容量
C. 成员中占内存量最大者所需的容量
D. 结构体中最后一个成员所需内存量
【单选题】
则以下对结构体变量std中成员age的引用方式不正确的是___。
A. std.age
B. p->age
C. (*p).age
D. *p.age
【单选题】
以下对共用体类型数据的叙述正确的是___。
A. 可以对共有体变量名直接赋值
B. 一个共用体变量中可以同时存放其所有成员
C. 一个共有体变量中不能同时存放其所有成员
D. 共用体类型定义中不能出现结构体类型的成员
【单选题】
下面对typedef的叙述中不正确的是___。
A. 用typedef可以定义各种类型名,但不能用来定义变量
B. 用typedef可以增加新类型
C. 用typedef只是将已存在的类型用一个新的标识符来表示
D. 使用typedef有利于程序的通用和移植
【单选题】
C语言共用体类型变量在程序运行期间___。
A. 所有成员一直驻留在内存中
B. 只有一个成员驻留在内存中
C. 部分成员驻留在内存中
D. 没有成员驻留在内存中
【单选题】
当说明一个共用体变量时系统分配给它的内存是___。
A. 各成员所需内存量的总和。
B. 第一个成员所需内存量。
C. 成员中占内存量最大者所需的容量。
D. 最后一个成员所需内存量。
【单选题】
已有定义“struct xy{int a; double b;}m;”,变量m的成员a的正确表示是___。
A. m.a
B. m->a
C. *m.a
D. xy.a
【单选题】
以下各选项企图说明一种新的类型名,其中正确的是___。
A. typedef int v1
B. typedef v2=int
C. typedef v3 int
D. typedef v4: int
推荐试题
【单选题】
Tom is a book lover. ______ likes reading very much.
A. He B. She C. You D. It
【单选题】
—May I listen to the music here, Mr. White?
—Sorry, you’d better it like that.
A. not to do B. not do to
C. dont do D. not do
【单选题】
3.—Did you have a good time at Lauras birthday party?
— Yes, indeed. Its several years ________ I enjoyed myself so much.
A. when B. before C. since D. that
【单选题】
4. —___________ is the Summer Palace from here?
About three kilometers away. You can take the No. 35 bus.
A. How long B. How far C. How often D. How much
【单选题】
5. I was looking for a birthday gift for my mother, but I couldnt find ______ suitable.
A. anything B. something C. nothing D. everything
【单选题】
6. A friend of my ____ and I are going to visit_______ next week.
A. father; Browns B. father's; Browns
C. father; the Browns D. father's; the Browns
【单选题】
7. She ______ very hard since she came to our school.
A. studies B. has studied C. is studying D. studied
【单选题】
8. — Who will send you to the new school, your mom or your dad?
— _______. Ill go there by myself.
A. Both B. Either C. Neither D. None
【单选题】
9.—Well do what we can ____English well this term.
—It’s high time for you to work hard.
A. study B.to study C. be studied D. be studying
【单选题】
10. —I’m going to Flower Bookstore. Could you tell me ______?
— Sorry, I don’t know. I’m new here.
A. where it is B. where was it C. where is it D. where it was
【单选题】
11. How do you like the dishes, Eric?
— Fantastic! Nothing tastes ________.
A. nice B. better C. terrible D. worse
【单选题】
12. ______ Lin Feng has to work late, she always wears a smile on her face.
A. Because B. If C. Until D. Though
【单选题】
13.You can save money _______ you buy cheaper things.
A. before B. unless C. if D. until
【单选题】
14. We will have a _________ holiday after the exam.
A. two-month B. two month’s C. two month D. two-months
【单选题】
15. —We will build an underground in Xuzhou before 2015.
— Wow, _______! Will it pass our place?
A. what an excited news B. how excited the news is
C. what exciting news D. how exciting
【单选题】
16. — Emily, here’s a dictionary.I hope it will help you in some way.
— Thank you.It’s ________ what I need.
A. almost B. still C. only D. just
【单选题】
17. —Oh.I’m hungry.Mum, can I have the hamburger on the plate?
—No.It tastes .
A. terribly B. terrible C. good D. well
【单选题】
18. —We can invite our teachers to the farewell party next Saturday.
—Yes, ______? I’ll call them at once.
A. what for B. what C. why not D. why
【单选题】
19.You can ________ ask the old man to move away to any other place because he has lived ________ here for at least sixty years.
A. hardly; alone B. hard; alone
C. hardly; lonely D. hardly; lonely
【单选题】
20.—I’m going back to see my grandparents this weekend.
—________.
A. It’s very nice of you B. You’d better hurry
C. Say goodbye to them D. Give my best wishes to them
【单选题】
21.—Why not take ____ umbrella with the sign “Made in China”? It is useful.
—What _______ good advice it is!
A. an; a B. a; a C. an; \ D. \; a
【单选题】
22. —Do you know the boy________ is sitting next to Peter?
— Yes. He is Peter’s friend. They are celebrating his ________ birthday.
A. who; ninth B. that; ninth C. /; ninth D. which; ninth
【单选题】
23. It was dark, ______ I couldnt see what was happening.
A. or B. though C. but D. so
【单选题】
24.—You can use MSN to talk with Vivien on the Internet.
—I know. But can you tell me ________?
A. what I can use it B. when I can use it
C. why can I use it D. how can I use it
【单选题】
25. _______ are you going to the School Uniform Exhibition, Amy ?
To learn about different styles of school uniform.
A. What B. Where C. Which D. Why
【单选题】
( ) 26. Where does the writer of "The little Prince" come from?
A.England. B.France. C.America. D.China.
【单选题】
( ) 27. What does the prince do after the fox tells him a secret?
A.He cares more about a flower and a sheep.
B.He meets many more strange adults on other planets.
C.He realizes his love for the rose and he goes back to his planet.
D.He discovers interesting things such as a snake, other roses and a fox
【单选题】
( ) 28. What does "The little Prince" mainly talk about? It' s about _________.
A.the adult world B.the planet B -612
C.a rose and a fox D.the adventure of a young prince
【单选题】
( ) 29. What is the writer's main purpose(目的)in writing this passage?
A.To tell the readers his life story.
B.To tell people what kind of person his father was.
C.To tell the readers what present he got from his father.
D. To let people know how poor he was.
【单选题】
( ) 30. Why did the father not ask his son not to do this and do that?
A.Because he felt quite confident of his son.
B.Because he was born from a poor family.
C.Because he was a man of few words.
D.Because he didn't want to be much too strict with his son.
【单选题】
( ) 31. What would someone learn from this passage?
A.How to live by oneself. B.How to stand on one's own feet.
C.What a good father should do. D.What the self-important is like.
【单选题】
( ) 32. What may be the proper Chinese for the underlined part in the passage?
A.闲暇时光 B.学费 C.精神空虚 D.经济不足
【单选题】
( ) 33. Why did Natalie Smith pay for the six cars behind her?
A. She had seven tickets.
B. She hoped to please others.
C. She knew the car drivers well.
D. She wanted to show kindness.
【单选题】
( ) 34. Judy Foreman copied down the phrase because she ___ .
A. thought it was beautifully written
B. wanted to know what it really meant
C. decided to write it on a warehouse wall
D. wanted her husband to put it up in the classroom
【单选题】
( ) 35. Who came up with the phrase according to the passage?
A. Judy Foreman. B. Natalie Smith. C. Anne Herbert D. Alice Johnson.
【单选题】
( ) 36. What can we infer from the last paragraph?
A. People should practice random kindness to those in need.
B. People who receive kindness are likely to offer it to others.
C. People should practice random kindness to strangers they meet.
D. People who receive kindness are likely to pay it back to the giver.
【单选题】
( ) 37.The greatest river for navigation is ___________.
A. the Nile B. the Amazon C. the Mekong D. the Mississippi
【单选题】
( ) 38. From a dam, people can use the water for ___________.
A. keeping the rivers clean B. only making electricity
C. irrigation and making electricity D. washing clothes
【单选题】
( ) 39. The water in the river is polluted because of _____________.
A. people's drinking water too much B. people's swimming in the river too much
C. chemicals and other materials D. people's building a dam across a river
【单选题】
( ) 40. The best title of the passage is ___________.
A. Rivers in Cities B. The importance of Rivers
C. Transportation D. Natural Resources