Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Urgent! ! Answers to the real questions of the national computer level 2 C language written test over the years.
Urgent! ! Answers to the real questions of the national computer level 2 C language written test over the years.
2065438+00 September National Computer Level 2 C Language Written Test: Text Edition

First, multiple-choice questions (2 points for each small question, 70 points for * * *)

Of the following four options a), b), c) and d), only one option is correct. Please fill in the correct options in the corresponding position on the answer sheet, and the answers will not be scored on the test paper.

(1) The following statement is correct.

A) The chain storage structure and sequential storage structure of linear tables need the same storage space.

B) The chain storage structure of linear tables generally needs more storage space than the sequential storage structure.

C) The chain storage structure of linear tables generally requires less storage space than the sequential storage structure.

D) None of the above three statements is correct.

(2) The following statement is correct.

A) In the stack, the elements in the stack change dynamically with the change of the bottom pointer and the top pointer.

B) In the stack, the pointer at the top of the stack remains unchanged, and the elements in the stack dynamically change with the pointer at the bottom of the stack.

C) In the stack, the pointer at the bottom of the stack remains unchanged, and the elements in the stack dynamically change with the pointer at the top of the stack.

D) None of the above three statements is correct.

(3) The purpose of software testing is

A) evaluate software reliability

B) Find out and correct the errors in the program.

C) correcting errors in the program

D) look for errors in the program.

(4) In the following description, what does not belong to the software crisis is

A) the software process is not standardized

B) Low productivity of software development

C) Software quality is difficult to control.

D) the cost of software is increasing.

(5) The software life cycle refers to

A) The process of software products from display, implementation, use and maintenance to retirement.

B) The process of software from requirements analysis, design, implementation to test completion.

C) software development process

D) software operation and maintenance process

(6) In the object-oriented method, inheritance refers to

A) Similar attributes of a group of objects

B) One object has the properties of another object.

C) * * homogeneity between objects

D) The mechanism of * * * sharing attributes and operations between classes.

(7) The principles for dividing hierarchical database, mesh database and relational database are as follows

A) recording length

B) file size

C) the complexity of the connection

D) contact information between data.

(8) A staff member can use multiple computers, and a computer can be used by multiple people. Therefore, the relationship between the entity staff and the entity computer is

A) one-on-one

B) one-to-many

C) many-to-many

D) many to one

(9) The way to reflect users' demand for data in database design is

A) internal mode

B) conceptual model

C) external mode

D) design mode

(10)R, s and t have the following three relationships:

Then the operation of obtaining the relation T from the relations R and S is

A) natural connection

B) payment

C) projection

D) and

(1 1) The following statement about structured programming is correct.

A) Structured programs must consist of three structures: sequence, branch and loop.

B) It is convenient for structured programs to use goto statements.

C) In C language, the modularization of programs is realized by functions.

D) A program consisting of three basic structures can only solve small-scale problems.

(12) The following statement about the steps and sequence of simple programming is correct.

A) After the algorithm is determined, the documents are compiled and finally coded and debugged on the computer.

B) First determine the data structure, then determine the algorithm, then code, debug on the computer, and finally sort out the documents.

C) Coding debugging, determining the algorithm and data structure in the coding process, and finally sorting out the documents.

D) Write the document first, then code and debug it on the computer according to the document, and finally determine the algorithm and data structure.

(13) What is wrong in the following statement is

A) All calculations of C program are carried out in binary mode.

B) All calculations of C program are carried out in decimal mode during running.

C) All C programs need to compile links correctly before they can run.

D) In C program, integer variables can only store integers, and real variables can only store floating-point numbers.

(14) has the following definition: int a;; Dragon b; Double x, y; The correct statement in the following options is

A)a% (integer) (x-y)

B)a=x! = y;

C)(a*y)%b

D)y=x+y=x

(15) The following options can represent legal constants.

A) Integer: 1, 200

B) Real number: 1.5E2.0

C) Character slash: "\"

D) String: "\007"

(16) The value of the expression a+=a-=a=9 is

A)9

B)_9

C) 18

D)0

(17) If the variable is defined correctly, in if (w) printf ("%d \ n, k "); Among them, the following is irreplaceable W.

A)ab+c

B)ch=getchar()

C)a==b+c

D)a++

(18) has the following steps.

# include & ltstdio.h & gt

Master ()

{int a= 1,b = 0;

If (! a)b++;

else if(a = = 0)if(a)b+ = 2;

else b+ = 3;

printf("%d\n ",b);

}

The output result after the program runs is

A)0

B) 1

C)2

D)3

(19) If there is a definition statement int a, b; ; Double x; There is nothing wrong with the following options.

A) switch (x%2) B) switch ((int)x/2.0

{ case 0:a++; Break; { case 0:a++; Break;

Case1:b++; Break; Case1:b++; Break;

Default: a++;+; b++; Default: a++;+; b++;

} }

C) switch ((int)x%2) D) switch ((int)(x)%2)

{ case 0:a++; Break; { case 0.0:a++; Break;

Case1:b++; Break; Case1.0: b++; Break;

Default: a++;+; b++; Default: a++;+; b++;

} }

(20) There are the following procedures

# include & ltstdio.h & gt

Master ()

{int a= 1,b = 2;

while(a & lt; 6){ b+ = a; a+= 2; b % 2 10; }

printf("%d,%d\n ",a,b);

}

The output result after the program runs is

a)5 1 1

7, 1

7, 1 1

6, 1

(2 1) has the following procedures.

# include < stdio.h & gt

Master ()

{ int y = 10;

while(y-);

printf("Y=%d\n ",Y);

}

The output after the execution of the program is

A)y=0

B)y= - 1

C)y= 1

D)while constitutes an infinite loop.

(22) There are the following procedures

#include