The programmer's written test of Baidu 2021QA test engineer multiple choice questions collection (13)

1. The shuffle of hadoop and spark is the same and the difference is described incorrectly ()
A. From a low-level perspective, the difference between the two is not small. Hadoop MapReduce is sort-based. Records entering spill() and reduce() must be
sorted first. B. Hadoop MapReduce divides the processing flow into distinct stages, each stage performs its own duties, and can be programmed according to procedural programming Thought to realize the function of each stage one by one.
C.Spark has only different stages and a series of transformation(), so operations such as spill, merge, aggregate, etc. need to be contained in transformation().
D. From a high-level point of view, there is no big difference between the two. Both partition the output of the mapper, and send different partitions to different reducers.

2. A system has three threads t1, t2, t3, the priority is t1>t2>t3, and the calculation and printing operation time is as follows (calculation and printing resources can only be occupied by one thread at the same time, to avoid multi-thread competition for resources And cause deadlock):
t1: calculation (6s) -> print (8s) -> calculation (2s)
t2: calculation (12s) -> print (4s) -> calculation (4s)
t3: calculation (4s) -> Printing (8s)->Calculation (4s)
The time saved by completing three threads concurrently with multiple threads than single-pass operation is ()
A.20s
B.28s
C.16s
D.24s

3. What kind of ANR() will be caused by key event timeout?
A.ContentProvider Timeout
B.InputDispatching Timeout
C.Service Timeout
D.BroadcastQueue Timeout

4. In the Linux system, users who contain the root string are denied to log in to the ftp service. The deny list file of the ftp service is /etc/deny.ftp. The following operations are correct ()
A.cut -f 1 -d :/ect /passwd | grep root> /etc/deny.ftp
B.cat /etc/passwd | grep root> /etc/deny.ftp
C.cut -f 1 -d :/etc/passwd | grep root 2> /etc/ deny.ftp
D.cut -f 1 -d:/etc/passwd | grep root | /etc/deny.ftp

5. The contents of the Test.java file are as follows, and the output result after the file is executed is ()
class A{ public int func(int a,int b){ return a*b; } } class B extends A{ public int func( int a,int b){ return a/b; } } public class Test{ public static void main(String[] args){ A a = new B(); B b = new B(); System,out.println (a.func(30,5) + b.func(30,5)); } } A.300 B. Compilation error C. Other items are not correct D.12



















6. Which of the following statements about abstract classes and interfaces is correct is () (multiple choice)
A. Abstract classes can have static methods, but interfaces cannot
B. Abstract classes and interfaces cannot contain static code blocks
C. A class Only one abstract class can be inherited, but multiple interfaces can be implemented
. D. Abstract classes and methods in interfaces can have method bodies

7. The shortcut keys for browsing GDB history commands, the correct one is () (multiple choice)
A.ctrl + pagedown next
B.ctrl + n next
C.ctrl + p previous
D.ctrl + pageup previous

8. Given the length of the string S = "ACBECAB", to construct a string T of the same length. T is an empty string. Repeat any of the following operations: 1) Delete a character from the head of S and add it to the end of T; 2) Delete a character from the end of S and add it to the end of T. Construct a string T with the smallest possible lexicographic order, and the string T will eventually be ()
A.BACEBCA
B.ABACCBE
C.ABACBCE
D.ABCABCE

9. At present, software companies choose their own defect tracking system. The purpose of tracking defects is () (multiple choice)
A. Ensure that every defect must be resolved
B. Classify defects
C. Find defects can be quantified
D. Software Quality can be controlled

10. When hashing the linear table (76,45,88,21,94,77,17), if H(k)=k%7 is selected as the hash function, the element with the hash address 3 has ()
A.4
B.3
C.5
D.2

11. The interrupt caused by () in the following items is an external interrupt (multiple choice)
AI/O device
B. Timer
C. Self-trapping instruction
D. Processor hardware failure

Guess you like

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