Northeastern University Spring Semester 20 "high-level language programming foundation X" line usually work 2

[Statement] this blog content is limited exchange of learning, no, please add micro-channel wxxygzs QQ3064302332 can then specify from CSDN
very much hope to share with you through CSDN this platform
Northeastern University 20 Spring Semester "high-level language programming foundation X" line usually job 2
paper total: 100 score: 100
a, multiple choice (a total of 25 questions, a total of 100 points)
1. set x, y are float type variables, the assignment statement is not correct ().
X ++ A;.
By int = (. 5);
Cx * = Y +. 1;
Dx = Y = 0;
Answer: B

2. If execute a program from the keyboard 34, the output is ().
#include main () {int A, B, S;
Scanf ( "% D% D", & A, & B);
S = A; IF (A <B) the printf ( "% D \ n-", S * S) ; B = S;}
A.186
B.256
C.324
America D.400
answer: B

3. Known ch is the character variable assignment statement is not correct ().
+ =. 5. 9 A.ch;
B.ch = '\ 0';
C.ch = '. 7' + '. 9';
D.ch = 'A + B';
Answer: D

4. The following description relating to macro substitution is incorrect ().
A. Macro name does not have type
B. macro names must be uppercase letters
C. macro replacement character just replace
D. macro substitution does not take up running time
Answer: B

5. If the following statement, the reference to an array element x is not correct (). X int [] = {. 1, 2,. 3,. 4,. 5,. 6}, PTR; X = PTR;
A.
(-ptr)
B. (ptr-)
C.
(PTR ++)
. D * (++ PTR)
answer: A

6. The following code (). (The number before the program each line of the line number) 1 main {} 2 {3 float a [10] = {0.0}; 4 int i; 5 for (i = 0; i <3; i ++) scanf (% d " , & a [i]); 6 for (i = 1; i <10; i ++) a [0] = a [0] + a [i]; 7 printf ( "% f \ n", a [0]) ;}. 8
A. 7 error line
B. error line 5
C. error line 3
D. error no
answer: B

Published 22 original articles · won praise 1 · views 2667

Guess you like

Origin blog.csdn.net/youxue100f/article/details/105397954