1, what is wrong in the following statement defining variables is-
A, int _int B, double int_ C, char For D, float US$ Answer: D- Knowledge points: constants, variables, identifiers.
2. The following are illegal user identifiers-
a、j2_KEY B、DoubleC、4d、8
Answer: c- knowledge points: constants, variables and identifiers.
3. In the following four groups of user-defined identifiers, all legal identifiers are-
A, mainly including sin B, If -max turbo C, txt REAL 3COMD, int k_2 _00 1
Answer: a 1 1 knowledge points: constants, variables, identifiers.
4. The following definition statement is correct-
A、char a = ' A ' b = Bb、float a = b = 10.0; (positive solution a= 10.0 b= 10.0)
c、int a= 10,* b = & ampa; float *a,b = & ampa; Answer: c- knowledge points: constants, variables and identifiers.
5. The following cannot be defined as user identifiers-
a、scanf B、VoidC 、_3com D、int
Answer: D- 1 knowledge point: constant, variable, identifier.
6. There are four groups of user identifiers, among which the legal one is-.
A, For -sub Case B, 4d DO dimensions
c、f2_G3 IF abc D、WORD Void define
Answer: c- knowledge points: constants, variables and identifiers.
7. The simplest data types in C language include-
A, integer type, real type, logical type B, integer type, real type and character type
C, integer type, character type, logical type D, integer type, real type, logical type and character type
Answer: knowledge points: constants, variables, identifiers.
8. Among the following options, the legal keywords of C language are-
A, VAR B, cher C, integer D, default answer: D- knowledge point: constant, variable, identifier.
9. The following cannot be defined as user identifiers-
A, main b, _0 C, _int D, sizeof
Answer: D- knowledge points: constants, variables and identifiers.
The following statement is true-
There are both logical types and set types in A and C languages.
There are no logical types in B and C languages, only set types.
There are logical types but no set types in C and C languages.
There are neither logical types nor set types in D and C languages. Answer: D 1 knowledge point: constant, variable, identifier.
1 1, when the value of c is not 0, the following options can correctly assign the value of c to variables A and B-
a、c = b = a; b 、( a = c)ll(b = c); C, (a=c) and amp & (b = c); d、a = c = b;
Answer: C- knowledge point: assignment expression
12. The illegal expression in the following options is-
a、0 & lt= x & lt 100 Bi=j==0 C 、( char)(65+3) D、x+ 1=x+ 1
Answer: D- 1 knowledge point: assignment expression
13. The output of the following program is-
# include & ltstdio.h & gtmain() [ int a,b,d = 24 1; a = d/ 100% 9;
b =(- 1); & amp(- 1); printf("%d,%d\n"a,b);
a、6 1 B、2 1 C、6,0 D、2,0
Answer: knowledge point: assignment expression
14. The execution time of the following loop bodies is-
main(){ int j; for (i=0,j = 1; I< = j+1; i+=2,j - ) printf("%d \n ",I);
a、3B、2C、 1 D、0
Answer: c- 1 knowledge point: assignment expression
15. there are the following definitions: double a, b; int w; Long c; If the variable has been assigned correctly, the correct expression in the following options is-
a、a=a+b=b++ B、w%((int)a+b) C 、( c+w)%(int)a D、w = a = B; Answer: c a knowledge point: assignment expression
16, the following program main () [int a; char c = 10; Floating f =100.0; Double x; a = f/= c * =(x = 6.5); printf(" % d % d % 3. 1f % 3. 1f \ n " a,c,f,x); After the program runs, the output result is-
a、 1 65 1 6.5 B、 1 65 1.5 6.5 C、 1 65 1.0 6.5
d、2 65 1.5 6.5
Answer: knowledge point: assignment expression
17. If variables A and I are correctly defined and I is correctly assigned, then the legal statement is-.
a、a== 1 B 、+ I; c、a = a++ = 5; d、a = int(I);
Answer: knowledge point: assignment expression
18, if the variable has been correctly defined and assigned, the following expression that conforms to the syntax of C language is-.
A, a:=b+ 1 B, a=b=c+2 C, int 18.5%3 D, a=a+7=c+b answer: B- 1 knowledge point: assignment expression.
19, if the variable x is of type float and has been assigned, the following statement can keep the value in x as.
Two decimal places, rounded to the third place is
a、x=x* 100+0.5/ 100.0 B、x =(x * 100+0.5)/ 100.0 c、x =(int)(x * 100+0.5)/ 100.0D、x=(x/ 100+0.5)* 100
Answer: c- 1 knowledge point: assignment expression
20. In the C language program-
The main function must appear before all functions.
The main function can appear anywhere.
C, the main function must appear after all functions.
D, the main function must appear in a fixed position.
Answer: b knowledge point: the composition and format of simple c language program
2 1, the following statement is true-
A, #define and printf are both C statements B, #define is C statement, but printf is not C statement, but #define is not D, #define and printf are not C statements Answer: D- knowledge points: composition and format of simple C language programs.
22, if k is an int variable, and there are the following program fragments-
k =-3 if(k & lt; = 0)printf(" # # # # ")elseprintf(" & amp; & amp& amp& amp);
The output of the above program fragment is
A, # # # B, & amp& amp& amp& ampc, # #& & AMPD, there are grammatical errors, and no results are output. Answer: D 1 Knowledge Point: Composition and format of simple C language program.
23. Among the following four options, what cannot be considered as a statement is-
a、l; } B、a=0,b=0,c = 0; c、if(a & gt; 0); d、if(b = = 0)m = 1; n = 2; Answer: D- 1 Knowledge point: Composition and format of simple C language program.
24, the following program main () [int a = 0b = 0; a = 10; /* Assign a value to a */ b=20; /* Assigned to b */ printf("a+b=%d\n ",atb)} The output after the program runs is-
A, a+b= 10 B, a+b=30 C, 30 D, wrong answer: B- 1 knowledge point: composition and format of simple C language program.
25. Among the following options, those that cannot be used as legal constants are-
A, 1.234e04 B,/kloc-0 1.234e004C, 1.234e+4 D, 1.234e0 Answer: B- 1 Knowledge point: real data.
28. The following real constants that conform to the syntax of C language are-
A, 1.2E0.5 B, 3. 14 159E C, 5E-3 D, E 15 answer: C- 1 knowledge point: real data.
30, the value of expression 36-5/2+ 1.2+5%2 is-
a、4.3 B、4.8 C、3.3 D、3.8
Answer: D- 1 knowledge point: arithmetic expression
3 1, let int a= 12, then after the statement a+=a-=a*a is executed, the value of A is-.
a、552 B、264 C、 144 D、264
Answer: D- knowledge point: arithmetic expression
32. The following variables X, Y, Z are all double types, which have been correctly assigned, so the C language expression that cannot correctly represent the digital sub-x/(y*z) is _-.
A, x/y*z B, x * (1(yz)) c, x/y* 1/z D, x/ylz answer: A- 1 1 knowledge point: arithmetic expression.
33, if the definition is: int a=8, b=5, c; Execute statement c = a/b+0.4; After that, the value of c is-
a、 1.4 B、 1 C、2.0 D、2
Answer: B- 1 knowledge point: arithmetic expression