Computer Science MCQs | Computer Science Multiple Choice Questions with Answers

Questions
1 Which of the following is an interrupt according to temporal relationship with system clock ?
A Maskable interrupt
B Periodic interrupt
C Division by zero
D Synchronous interrupt

Answer: Option [D]
2 Which of the following is incorrect for virtual memory ?
A Large programs can be written
B More I/O is required
C More addressable memory available
D Faster and easy swapping of process

Answer: Option [B]
3 In 8085 microprocessor, the digit 5 indicates that the microprocessor needs
A –5 volts, +5 volts supply
B +5 volts supply only
C –5 volts supply only
D 5 MHz clock

Answer: Option [B]
4 In 8085, which of the following performs : load register pair immediate operation ?
A LDAX rp
B LHLD addr
C LXI rp, data
D INX rp

Answer: Option [A]
5 Consider following schedules involving two transactions : S 1 : r1(X); r1(Y); r2(X); r2(Y); w2(Y); w1(X) S 2 : r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X) Which of the following statement is true ?
A Both S1 and S2 are conflict serializable
B S1 is conflict serializable and S2 is not conflict serializable
C S1 is not conflict serializable and S2 is conflict serializable
D Both S1 and S2 are not conflict serializable

Answer: Option [B]
6 Which one is correct w.r.t. RDBMS ?
A primary key ⊆ super key ⊆ candidate key
B primary key ⊆ candidate key ⊆ super key
C super key ⊆ candidate key ⊆ primary key
D super key ⊆ primary key ⊆ candidate key

Answer: Option [C]
7 Let pk(R) denotes primary key of relation R. A many-to-one relationship that exists between two relations R1 and R2 can be expressed as follows :
A pk(R2) → pk(R1)
B pk(R1) → pk(R2)
C pk(R2) → R1 ∩ R2
D pk(R1) → R1 ∩ R2

Answer: Option [B]
8 For a database relation R(A, B, C, D) where the domains of A, B, C and D include only atomic values, only the following functional dependencies and those that can be inferred from them are : A → C B → D The relation R is in _______.
A irst normal form but not in second normal form
B oth in first normal form as well as in second normal form
C Second normal form but not in third normal form
D Both in second normal form as well as in third normal form

Answer: Option [B]
9 Which of the following statement(s) is/are correct ?
A Persistence is the term used to describe the duration of phosphorescence
B The control electrode is used to turn the electron beam on and off
C The electron gun creates a source of electrons which are focussed into a narrow beam directed at the face of CRT
D All of the above

Answer: Option [B]
10 A segment is any object described by GKS commands and data that start with CREATE SEGMENT and Terminates with CLOSE SEGMENT command. What functions can be performed on these segments ?
A Translation and Rotation
B Panning and Zooming
C Scaling and Shearing
D Translation, Rotation, Panning and Zooming

Answer: Option [B]
11 Given the following two languages : L 1 = {an bn | n ≥ 0, n ≠ 100} L 2 = {w ∈ {a, b, c}*| na(w) = nb(w) = nc(w)} Which of the following options is correct ?
A Both L1 and L2 are not context free language
B Both L1 and L2 are context free language
C L1 is context free language, L2 is not context free language
D L1 is not context free language, L2 is context free language

Answer: Option [A]
12 A recursive function h, is defined as follows : h(m) = k, if m = 0 = 1, if m = 1 = 2 h(m – 1) + 4h(m – 2), if m ≥ 2 If the value of h(4) is 88 then the value of k is :
A 0
B 1
C 2
D -1

Answer: Option [B]
13 Suppose there are n stations in a slotted LAN. Each station attempts to transmit with a probability P in each time slot. The probability that only one station transmits in a given slot is _______.
A nP(1 – P)n – 1
B nP/n
C P(1 – P)n – 1
D nP(1 – P)n – 1

Answer: Option [D]
14 Station A uses 32 byte packets to transmit messages to station B using sliding window protocol. The round trip delay between A and B is 40 milliseconds and the bottleneck bandwidth on the path between A and B is 64 kbps. The optimal window size of A is ________.
A 20
B 10
C 30
D 40

Answer: Option [A]
15 Let G(x) be generator polynomial used for CRC checking. The condition that should be satisfied by G(x) to correct odd numbered error bits, will be :
A (1 + x) is factor of G(x)
B (1 – x) is factor of G(x)
C (1 + x2) is factor of G(x)
D x is factor of G(x)

Answer: Option [B]
16 In a packet switching network, if the message size is 48 bytes and each packet contains a header of 3 bytes. If 24 packets are required to transmit the message, the packet size is ________.
A 2 bytes
B 1 byte
C 4 bytes
D 5 bytes

Answer: Option [B]
17 A node X on a 10 Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 2 Mbps. Token bucket is initially filled with 16 megabits. The maximum duration taken by X to transmit at full rate of 10 Mbps is _________ secs.
A 1
B 2
C 3
D 4

Answer: Option [B]
18 The asymptotic upper bound solution of the recurrence relation given by T(n) = 2T⎝ ⎜ ⎛ ⎠ ⎟ ⎞n 2 + n lg n is :
A O(n2)
B O(n lg n)
C O(n lg lg n)
D O(lg lg n)

Answer: Option [B]
19 Any decision tree that sorts n elements has height ________.
A Ω(lg n)
B Ω(n)
C Ω(n lg n)
D Ω(n2)

Answer: Option [B]
20 Red-black trees are one of many search tree schemes that are “balanced” in order to guarantee that basic dynamic-set operations take ________ time in the worst case.
A O(1)
B O(lg n)
C O(n)
D O(n lg n)

Answer: Option [B]