Computer Science MCQs

Computer Science MCQs

Answer these 900+ Computer Science MCQs and assess your grip on the subject of Computer Science. Scroll below and get started!

1:

What would be the output string, if the bitstring "0111101111101111110" is subjected to bit-stuff‌ing for the flag string "01 1111 1 0"?


A.  

011110111110111111010

B.  

011110111110011111010

C.  

011111011111001111101

D.  

011110111110101111010

2:

What number of swapping is required to sort the given series in ascending order, if the bubble sort is used for sorting?


8,22.6,9,31,19,5,13


A.  

13 

B.  

14 

C.  

15

D.  

15

3: If the input string in 'Moore' machine is of length 'm', the output string would be of the length

A.   m+1

B.   m-1

C.   m/2

D.   m

4:


A deterministic f‌inite automation 'F' is given in the image. having 'start‘ state and accepting state (S).


Select the regular expression from the following options that denotes the set of all words accepted by


‘F'-


A.  

(011 )* 011

B.  

10° 1' 0

C.  

001

D.  

10' 1‘ 010

E.  

1‘ 0‘ 011

5:

What would be the postfix expression of the given infix expression?

((AtBI'C-(D-E))$(F+G)


A.  

AB-C“DE+-FG+$  

B.  

 AB+C'D--EFG+$  

C.  

AB+C*DE--FG+$

D.  

AB-C-DE’+FG+$

6: Which of the following languages is generated byK=[[S],[a,b),[S-> aSlelalb],S]?

A.   {a.b }

B.   [a b }+

C.   { a.b }* +{ ^ }

7:

Which of the following options implements the divide-and-conquer algorithm.

1. Insertion sort

2. Bubble sort

3. Quick sort


A.  

1 only

B.  

2 only

C.  

3 only

D.  

1 and 2 only

E.  

2 and 3 only

8:

Which of the following regular expressions have all strings in which any number of 9's is followed by any number of 5's, followed by any number of 2's?

A.  

(9 I 5 l 2 r

B.  

9* + 5 + 2 

C.  

r 9 + 5 r 2'

D.  

9- 5’ 2- 

9:

Consider a 9-bit digital-to-analog converter that uses a ladder network. What would be the approximate resolution, in volts, if the full-scale output voltage of this converter is +5v?


A.  

6 mV approximate 

B.  

8 mV approximate 

C.  

10 mV approximate 

D.  

12 mV approximate

10: Which of the given network IDs of Classes A, B. and C can exist?

A.   128

B.   256

C.   16.384

D.   2.113.658

E.   None of the above

11:

The use of 'V.42' compression with a 'V.32' bits per second (bps) modem operating at 14,440 bps can result in a maximum throughput of bps.

A.  

38,400

B.  

57,600 

C.  

14,400

D.  

7,600

12: Which of the following options is not in the set 'S', if 'S' is given as ( ab \ abb )* bb ab?

A.   ab abb a bbb ab

B.   abb abb bab

C.   ab bb ab

D.   ab ab ab

13:

If the mean arrival rate of packets into a packet switch is 1,000 packets per second (PPS), and the mean service rate is 1.025 packets per second, then what would be the total waiting time. including the

service time?


A.  

0.14 sec  

B.  

0.24 sec   

C.  

0.90 sec

D.  

0.04 sec

E.  

0.51 sec

14:

The signal to noise ratio for a voice trade line is 30.1 db, or a power ratio of 1023:1. What would be the maximum achievable data rate on this line whose spectrum ranges from 300-4300 Hz?


A.  

2,400 bits/sec

B.  

3,400 bits/sec

C.  

9.400 bits/sec

D.  

16.400 bits/sec

E.  

31,000 bits/sec 

15: What would be the probability of getting 8 as the sum if three dices are rolled simultaneously?

A.   8/216

B.   8/72

C.   21/216

D.   21/72

16:

What would be the rank of the matrix that is given in the image?

A.  


B.  


C.  


D.  

4

17: Which of the following is not a feature of a good software requirements specification (SRS) document?

A.   It should be concise.

B.   It should specify the implementation and issues in it.

C.   It should exhibit conceptual integrity.

D.   It should be structured.

18: If the three regular expressions: p=1(1+0)‘, q=11‘0, r=1'0 are given, then which of the following options is true?

A.  

L (q)<=Llr)andL(q)<=L(p)

B.  

 L (r)<=L(q)andLlCl)<=L(p)

C.  

L (q)<=Llp)andL(ql<=l-(r)

D.  

L (p)<=LlCl)andL(q)<=L(r)

19:

Consider the schema. R = (ABCD) and the dependencies A -> B. B -> C. C -> D. and D -> A. Let R = (R1 and R2) be a decomposition, such that R1 (1 R2 = (D. The decomposition is in .


A.  

1 NF but not in 2NF

B.  

2 NF but not in 3 NF   

C.  

3 NF but not in 2 NF

D.  

both 2 NF and 3 NF 

20:

Which of the following COMPOSITE DATABOUND controls was not available in ASP.net 3.5, but is available in ASP.net 4.0?


A.  

Data pager control  

B.  

Detail view control   

C.  

Chart control

D.  

Form control

21:

Analyze the given information and choose the correct answer.

There are two modules in a programming code. It is given that the probability of success of modules in 'Unit testing' is 0.9 for each. If the probability of success of 'Integration testing' is also 0.9. then what would be the joint probability of success?


A.  

0.1

B.  

0.82 

C.  

0.91

D.  

 0.729

22:

Analyze the following information and identify the correct scheme.

It is a scheme in which the thread library schedules user-level threads to run on an available light-weight process (LWP).


A.  

Process-contention scope (PCS)

B.  

System-contention scope (SCS)

C.  

Symmetric multiprocessing (SMP)

23:

What would be the labels of the nodes (numbered from 1 to 7) in the given image. if the post order traversal of the tree gives the below-given expression?

x y - z w

A.  

-.x.y.+.’.z.w 

B.  

x.y.z.w.-.‘.+ 

C.  

x.-.y.+.z.‘.w

D.  

+.-.‘.x.y.z.w   

24:

Consider the table given in the image and f‌ind the value of "f(9)" by using Lagrange

A.  

120 

B.  

240 

C.  

180 

D.  

320

25: If a relational schema is in the Boyce-Codd Normal Form (BCNF). then it is also in the .

A.   1st normal form

B.   2nd normal form

C.   3rd normal form

26:

Consider the example of four processes given in the image, with their arrival time (in milliseconds) in the ready queue for execution. and their CPU burst time. Find the difference of average waiting time between preemptive and non-preemptive SJF scheduling.

A.  

6.5 milliseconds 

B.  

2.25 milliseconds

C.  

4.75 milliseconds

D.  

5.2 milliseconds

E.  

1.75 milliseconds

27:

Suppose you are working on a highly complex project, which involves several kinds of risks. Which software-life-cycle model you should use in such a situation so that the best product can be obtained?

A.  

V—Shaped Model

B.  

Prototype Model  

C.  

Spiral Model 

D.  

Waterfall Model

28:

Simplify the given Boolean function using the K—map and select the correct answer from the options.

F(a,b,c,d)=2(0,1,2,4,5,6,8,9,12,13,14)


A.  

b' + a'c' + d'c

B.  

c‘ + ac‘ + b'c  

C.  

a' + b‘c' + bc

D.  

c' + a'd' + bd'

29:

Which of the following statements is/are true about Shadows in ASP.net 4.0?

1. It is always used with inheritance.

2. It is a combination of overloading and overriding.

3. We can change signatures of functions.


A.  

1 only 

B.  

2 only

C.  

3 only

D.  

1 and 2 only

E.  

2 and 3 only


F.  

1. 2. and 3 

30: Which of the following is a regular expression for a regular grammar S -> aS/a?

A.   a+

B.   a * a

C.   1 only

D.   2 only

E.   Both 1 and 2

31:

Two regular languages are given as:

L1 = (a+b)'a

L2 = b(a+b)‘b

Which of the following options is an intersection of the above given languages?

A.  

ab (a + b )t 

B.  

b (a + b )’ a

C.  

(a+b)'ab(a+b)‘

D.  

t a + b )1 ab

32:

Examine the below given SOL statements and answer the following question.
SELECT last_name. salary. hire_date FROM EMPLOYEES ORDER BY salary DESC
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC
Which of the answer options is true?

A.  

The two statements produce identical results.

B.  

The second statement returns an error.

C.  

There is no need to specify DESC because the results are sorted in descending order by default.

D.  

None of the above.

33:

What would be the output of the circuit that is shown in the image, if all the inputs given to the circuit are zeros?

A.  


B.  

1

C.  

0 and 1

D.  

It will not give any output

34: In the ModeI-View-Controller(MVC) mode, JSP generally belongs to .

A.   Model

B.   View

C.   Controller

35:

Suppose there are two relations: 'R1' and 'R2'. lf 'C1' and 'C2' are the selection conditions, and 'A1' and 'A2‘ are the attributes of the relation 'R1‘, then which of the given query transformations is/are correct?
1- 0C1 (0C1 (R11) '> Ocz (Gc2 1R1)
2- 0C1 (“A1 1R1» 7" ”A1 (0c1 (R11)

A.  

1 only  

B.  

2 only

C.  

Both 1 and 2

A.   Full duplex

B.   Halfduplex

C.   Simplex

D.   Both half duplex and simplex

37: In the "Baudot code", which of the given numbers of bits per symbol are used?

A.   2

B.   3

C.   4

D.   5

38: Which of the following is an automation in which the output only depends on the states of the machine?

A.   Moore machine

B.   Automation without a memory

C.   Automation with finite memory

D.   Mealy machine

39:

Which of the given options will be generated by the following grammar?

A={{ Q }.{ 0-1 } P,Q}

where P=(Q->O 0,0->OQ1,0->1O O, O-> empty}]


A.  

Regular language   

B.  

Context free language 

C.  

 Context sensitive language

40: What would be the correct time required to search an element in 'binary search tree‘ with 'k‘ elements?

A.   0 (k)

B.   o ( k Iogz k)

C.   o ( '092 k)

D.   o ( k2)

41:

Choose the correct algorithm from the following options that solves the problem of all pairs shortest paths.


A.  

Bellman—Ford algorithm

B.  

Dijkstra's algorithm  

C.  

 Floyd-Warshall algorithm

D.  

Prim algorithm

42:

Consider the example, in the given image, with five processes and their CPU burst time (in milliseconds). Which of the following scheduling algorithms will give the lowest average waiting time“

A.  

Shortest Job First   

B.  

First-Come First-Served Scheduling

C.  

Round Robin (with quantum =10 milliseconds)

43:

A function is given as:

f(A.B.C.D) = Z(0.1.3.4.8.9.15)

A is the Most Significant Bit and D is the Least Signif‌icant Bit. By using the above minterms of the given

function in the table (given in Figure-1), implement it with a multiplexer and choose the correct implementation from Figure-2 (given in the image).



A.  


B.  


C.  

3

D.  


44:

The given image shows two cases of processes that follow the

A.  

8.2 milliseconds  

B.  

 11.8 milliseconds

C.  

14.6 milliseconds

D.  

16.4 milliseconds

A.  

ISL 

B.  

vtp 

C.  

IEEE 802.10 

D.  

IETF

46:

Assume that your magnetic-tape drive has a transport speed of 200 inches per second and a recording density of 1,600 bytes per inch. How long would it take to write 6.00.000 bytes of data grouped in 100

characters record with a blocking factor of 10?


A.  

4.3252 sec  

B.  

3.5431 sec

C.  

2.0625 sec 

D.  

1.2067 sec

47:


Fill in the blank:

Image number is the image of 'Mac OS X' structure.

A.  


B.  


C.  

3

48:

Which of the following satisf‌ies the given recurrence relation?

T(k)=mT(k/2)+ak2


A.  

T( k)= o ( km)  

B.  

T(k)=O(k log m)

C.  

T(k)=O(log k)

D.  

T(k)=O(m log k)

49: Which of the following statements is true?

A.   The sum of degrees of all the nodes in any un-directed graph must be odd.

B.   The sum of degrees of all the nodes in any un-directed graph is twice the number of edges.

C.   The sum of degrees of all the nodes in any un-directed graph is thrice the number of edges.

50:

Which of the following statements is/are true about triggers and routines?

1. Both run automatically

2. Both are stored in the database

3. Both consist of procedural code


A.  

1 only   

B.  

2 only 

C.  

3 only

D.  

Both 1 and 3 are true

E.  

Both 1 and 2 are true

F.  

Both 2 and 3 are true

G.  

All the statements are true