Sichuan University C language program 2, Sichuan University 17 spring "C language programming 0008" 17 spring online homework 2

17 Chuncheon University Online Homework Reference Answers

Sichuan University 17th spring "C language programming 0008" 17th spring online homework 2

One, multiple choice

1、C

2、D

3、C

4、B

5、D

One, multiple choice

1. Multiple-choice questions (25 questions in total, 100 points in total.) V 1. In the following program segment, the number of times the while loop is executed is (). int k=0; while(k=1) k++;

A. Execute once

B. not once

C. Execute infinite times

D. The prompt has grammatical errors

Correct Answer: C

2. Let a be an integer variable, which of the following expressions is incorrect ( ).

A. a=a+1

B. a++

C. (++a)+1

D. a+(1++)

Correct answer: D

3. If there is an algebraic expression, the incorrect C language expression is ( )

A. a/c/d*b*2

B. 2*a*b/c/d

C. 2*a*b/c*d

D. a*b/c/d*2

Correct Answer: C

4. main( ) { int a=666, b=888; Printf(“%dn”, a,b); } The output result after the program runs is ( ).

A. Error messages

B. 666

C. 888

D. 666,888

Correct Answer: B

5. Which of the following options is not a statement in C language ()

A. Empty statement

B. Function call statement

C. Expression Statements

D. Input and output statements

Correct answer: D

6. Which of the following statements is incorrect ()

A. A C source program can consist of one or more functions

B. The C source program that generates the executable program must contain a main function

C. The basic unit of C program is the function

D. One statement in a C program occupies one line

Correct answer: D

7. Among the C language constants listed below, the wrong one is ().

A. OxFF

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324092417&siteId=291194637