Collecting and sorting out multiple choice questions for programmers' written examination (4)

1.a=[[1,2],[3,4],[5,6]]
print([j for i in a for j in i])
The output of the above code is:
A.[1,2 ,3,4,5,6]
B.[1,3,5]
C.[6,5,4,3,2,1]
D.[2,4,6]

2. If the pre-order traversal sequence of a binary tree is a, e, b, d, c, and the post-order traversal sequence is b, c, d, e, a, then the child node of the root node
A. Only e
B . There is e, c
C. There is e, b
D. Unsure

3. The big clock on the square rings 6 times at 6 o'clock, and it finishes in 15 seconds. Twelve times at 12 o'clock, how long does it take to finish?
A.30
B.33
C.32
D.36

4. What is the output after the following program is executed?
a=1
b=[]
def fun1(a):
a=2
def fun2(b):
b.append(1)
fun1(a)
fun2(b)
print a,b
A.2 [1]
B.1 [ 1]
C.1 []
D.2 []

5. What’s wrong about the cookie and session description:
A. The cookie is stored in the client browser, while the session is stored on the server.
B. The session has an expiration date, but the cookie has no expiration date.
C. The cookie is not very safe, others can. Analyze the cookies stored locally and perform cookie deception
D. If the browser disables cookies, the session mechanism will not fail

6. The data format in the api_params field is json. Which of the following sql can query the operation field in the api_params field in Tab_A?
A.SELECT json_array(content,'$ .api_params.operation') FROM Tab_A
B.SELECT json_quote(content,'$ .api_params.operation') FROM Tab_A
C.SELECT json_extract(content,'$ .api_params.operation') FROM Tab_A Tab_A
D.SELECT json_intract(content,'$.api_params.operation') FROM Tab_A

7. What is the time complexity of the following program?
for(int i=1;i<n;i=i*2){ System.out.println(i) } Ao(1) Bo(n^2) Co(log n) Do(n)





8. Which of the following descriptions about the linked list in the data structure is wrong
A. The storage density of the singly linked list is less than 1
B. Each element of the linked list stores the address of the next element
C. Only one of the two-way list structure is required Pointer
D. Merging two ordered linked lists only requires the time complexity of o(n)

9. The wrong statement about range and xrange in python2 is that ()
A.range will directly generate a list object
B.xrange will get a generator object
C. Each call to xrange will return one of the values
D.range do a loop Performance is better than xrange

10. The important files used for database recovery are
A. Database file
B. Index file
C. Log file
D. Remark file

11. In the request paging storage management solution, if a user space has 16 pages, the page length is 1KB, and the existing page table is as follows, the physical address corresponding to the logical address 102B (H) is ()
page number block number
0 1
1 5
2 3
3 7
4 2
A.312B(H)
B.082B(H)
C.202B(H)
D.282B(H)

12. Xiaoxiimi hopes to visit the website shopee.com, enter https://shopee.com/ in its browser and press Enter until the homepage of shopee website is displayed in its browser. May I ask: During this process, follow TCP /IP network model, what protocols are used in the application layer?
A. HTTP, TCP
B. HTTP, IP, DNS
C. HTTP, DNS
D. HTTP, DNS, IP, ARP, TCP

13. Regarding the database index, the following statement is correct:
A. Building indexes for certain fields can effectively reduce the disk space occupation of related database tables.
B. Common database management systems usually use hash tables to store indexes
. C. For some Field indexing can effectively improve the efficiency of reading and writing related fields.
D. The existence of database indexes may reduce the efficiency of deleting related fields

14. Among the following options, the measures that can shorten the execution time of the program are
I. Increase the CPU clock frequency
II. Optimize the data path structure
III. Compile and optimize the program
A. Only I and II
B. Only II and III
C. Only I and III
DI, II and III

15. A triangle with three ants on three ends. The ants can walk around any side. What is the probability that the ants will not collide?
A.1/3
B.1/2
C.3/8
D.1/4

16. Sort a set of data (4,15,18,90,6,13), if the results of the first three passes are as follows:
the results of the first pass are: 4,15,18,6,13,90
second The sort result of the trip is: 4,15,6,13,18,90 The sort result of the
third trip is: 4,6,13,15,18,90
A. Bubble sort
B. Merge sort
C. Hill sort
D. Base sort

17. In Sorcket programming, which of the following Sorcket operations is not a server operation?
A.accept
B.connect
C.listen
D.close

18. In a system that supports multi-threading, what cannot be shared among several threads created by process A?
A. Code segment of
process A B. Global variables of
process A C. File opened in
process A D. Stack pointer of a thread in process A

19. A test technology forum will be held soon, and both A and B may be invited to participate. Now, A has learned the following news:
(1) The forum organizer has decided to invite at least one of A or B
(2) The forum organizer has decided not to invite A
(3) The forum organizer will definitely invite A
(4) Forum The organizer decides to invite B.
If two of the above messages are true and two are false, then:
A. The forum organizer decides to invite A and not
B. The forum organizer decides to invite A and B at the same time
C. Forum sponsor Party decides to invite B, not A.
D. The forum organizer decides not to invite A nor B

20. If a page fault occurs when the user process accesses the memory, among the following options, the operation that the operating system may perform is 1, handle out-of-bounds error II, replace page III, allocate memory
A. Only I and II
B. Only II and III
C .Only I and III
DI, II and III

Guess you like

Origin blog.csdn.net/qq_34124009/article/details/107972434