求答案C++Section 1: Single Choice(2 mark for each item, total 2

求答案C++
Section 1: Single Choice(2 mark for each item, total 20 marks)
1、下列字符中,可作为C++语言程序自定义标识符的是( )
1、 In the following characters, ( ) can be the user-defined identifier of C++.
A.switch B.file C.break D.do
2、 运算符 +、<=、=、% 中,优先级最低的是( )
2、 In the operational characters “+、<=、=、%”, ( ) has the lowest priority.
A. + B.<= C.= D.%
3、设有代码“int a = 6;”,则执行了语句“a + = a - = a*a;”后,变量a的值是( )
3、Given: code “int a = 6;”, then after execute “a + = a - = a*a;”, the value of variable “a” is ( )
A.0 B. -24 C. -40 D. –60
4、设变量m,n,a,b,c,d均为0,执行(m = a==b)&&(n=c==d)后,m,n的值是( )
4、Given: m,n,a,b,c,d=0, after execute “(m = a==b)&&(n=c==d)”, value of “m,n” are ( )
A. 0,0 B. 0,1 C. 1,0 D. 1,1
5、设a=2,b=3,c=2;计算a+=b*=(++b-c++)中a、b、c的值( )
5、 Given: a=2,b=3,c=2;calculate the values of “a、b、c” in “a+=b*=(++b-c++)” ( )
A. 8、6、2 B. 2、4、2 C.10、8、3 D. 5、3、3
6、 已知:int i=3,下列do-while循环语句的循环次数为( )
6、Given: int i=3, the cycle index of Loop statement “do-while” is ( )
do{cout<;
}while(i!=2);
A. 0 B. 1 C. 3 D. infinite
7、下面关于循环语句的描述中,( )是错误的
7、In the following descriptions about Loop statements, ( ) is wrong.
A.Loop body can include Loop statements.(循环体内可以包含有循环语句)
B.Loop body can be null statement. (循环体内可以是空语句)
C.Loop body can appear select statement(循环体内可以出现选择语句)
D.Loop body must appear “break” statements.(循环体内必须出现break语句)
8、 以下不能对二维数组a进行正确初始化的语句是( )
8、 In the following statements, ( ) can’t correctly initialize two-dimensional array “a”.
A.int a [2][3]={0};
B.int a [][3]={{1,2},{0}};
C.int a [2][3]={{1,2},{3,4},{5,6}};
D.int a [][3]={1,2,3,4,5,6};
9、下列是为字符数组赋字符串的语句组,其中错误是( )
9、There are some statements for character string, ( ) is wrong.
A.char s[10]; s=”program”; B.char s[]=”program”;
C.char s[10]=”Hello!”; D. char s[10];strcpy(s,”hello!”);
10、在函数的定义格式中,下面各组成部分中,( )是可以省略的
10、In the Definition Format of Functions, in the following constituent parts, ( ) can be abbreviated.
A.function name (函数名) B.function body(函数体 )
C.function data type specification (函数数据类型说明) D. function argument(函数参数)
mwd_2000 1年前 已收到1个回答 举报

barrakily 幼苗

共回答了17个问题采纳率:82.4% 举报

ACDDCBDBAB 今天过来看了下,有个问题当时不是很明了,现在用vc去试了下,改过来了!

1年前

8
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 0.105 s. - webmaster@yulucn.com