This question bank is compiled and organized based on the latest exam syllabus requirements, combined with the key points of recent exam questions, forming a complete simulation of the exam. Candidates can conduct targeted training to identify and fill knowledge gaps.
This question bank carefully organizes and edits hot exam questions and key points, and we believe that after targeted practice, candidates will have more confidence and grasp of the exam content.~ Below are some questions from this exam, with answers at the end.
Source of the question bank: “Computer Level 2 Question Bank Excellent Questions” mini program
1.(69) The description of the data view used by a single user is called ()
A External Mode
B Conceptual Mode
C Internal Mode
D Storage Mode
2. Among the definitions of the struct type variable td, the incorrect one is () .
A typedef struct aa { int n; float m; }AA; AA td;
B struct aa{ int n;float m;}td;stmct aa td;
C struct { int n; float m; }aa; struct aa rd;
D struct{ int n;float m;}td;
3. Let p1 and p2 be pointer variables pointing to a one-dimensional blood type array, and k be an int type variable, then the statement that cannot be executed correctly is
A k=*p1+*p2
B p2=k;
C p1=p2;
D k=*p1*(*p2);
4. Given the definitions int a; double b; float c; char k;, the type of the value of the expression a/b+c-k is:
A int
B double
C float
D char
5. The following code segment: struct st {int x; int *y;}*pt; int a[]={1,2}, b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; Among the options, the expression that evaluates to 11 is () .
A *pt->y
B pt->x
C ++pt->x
D (pt++)->X
6. The output of the following program is ( ). main(){ int a=-5, b=1, c=1; int x=0, Y=2, z=0; if(c>0)x=x+ y; if(a<=0) { if(b>0) if(c<=0)y=x-y; } else if(c>0)Y=x-y; else z=y; printf(“%d, %d, %d\n”, x, y, z);}
A 2,2,0
B 2,2,2
C 0,2,0
D 2,0,2
7. The return type of the function is ( ). fun(double x) { float y; y=3*x-4; return y; }
A int
B Uncertain
C void
D float
8. There are 1000 64×64 matrix character libraries, and their storage space is () KB.
A 500
B 1000
C 512
D 1024
9. The following program int f1(int x, int y){return x>y?x:y;} int f2(int x, int y){return x>y?y:x;} main() { int a=4, b=3, c=5, d=2, e, f, g; e=f2(f1(a,b),f1(c,d));f=f1(f2(a,b),f2(c,d));g=a+b+c+d-e-f; printf(“%d,%d,%d\n”, e,f,g); } The output after the program runs is
A 4,3,7
B 3,4,7
C 5,2,7
D 2,5,7
10. The following is a user-defined identifier:
A _w1
B 3_xy
C int
D LINE-3
11. If the variable x is given an input of 12 at runtime, the output of the following program is main() { int x,y; scanf(“%d”,&x); y=x>12? x+10:x-12; printf(“%d\n”,y);}
A 0
B 22
C 12
D 10
12. The chain storage structure of a linear table is a type of ______ storage structure.
A Random Storage
B Sequential Storage
C Index Structure
D Hash Structure
13. The output of the following program is ______. #include
A ihgfedcba
B abcdefghi
C abcdedeba
D ihgfefghi
14. The main task of software detailed design is to determine the ( ) of each module.
A Algorithm and Data Structure Used
B External Interfaces
C Functions
D Programming
15. The output of the following program is ( ). #include
A 4
B 7
C 6
D 5
16. The following option is an incorrect real constant ( ).
A 2.607E-1
B 0.8103e2
C -77.77
D 456e-2
17. If int a=11; then the value of the expression (a++*1/3) is ( ).
A 0
B 3
C 4
D 12
18. Two smart people A and B go shopping and find a shopping card worth 10 yuan. They think of a way to distribute this card. They each write down their price, and whoever offers a higher price gets the card, and that person must give the other the amount they offered. Now A has 6 yuan, and B has 8 yuan. Both know how much the other has and want to earn more than the other. Who will end up with more money?
A A more
B B more
C The same
D There may be a situation where someone loses money
19. The following program: #include
A 0101
B 1000
C 1100
D 1010
[Reference Answers]
1.A
2.C
3.B
4.B
5.C
6~20 Long press to recognize or scan the QR code below to enter the “Computer Level 2 Question Bank Excellent Questions” mini program to search for answers to questions, which will also regularly update exam question resources. Come and practice!