Computer Science MCQs | Computer Science Multiple Choice Questions with Answers

Questions
1 The minimum number of scalar multiplication required, for parenthesization of a matrixchain product whose sequence of dimensions for four matrices is <5, 10, 3, 12, 5> is
A 630
B 580
C 480
D 405

Answer: Option [A]
2 Dijkstra’s algorithm is based on
A Divide and conquer paradigm
B Dynamic programming
C Greedy Approach
D Backtracking paradigm

Answer: Option [B]
3 A software company needs to develop a project that is estimated as 1000 function points and is planning to use JAVA as the programming language whose approximate lines of code per function point is accepted as 50. Considering a = 1.4 as multiplicative factor, b = 1.0 as exponention factor for the basic COCOMO effort equation and c = 3.0 as multiplicative factor, d = 0.33 as exponention factor for the basic COCOMO duration equation, approximately how long does the project take to complete ?
A 11.2 months
B 12.2 months
C 13.2 months
D 10.2 months

Answer: Option [D]
4 A memory management system has 64 pages with 512 bytes page size. Physical memory consists of 32 page frames. Number of bits required in logical and physical address are respectively :
A 14 and 15
B 14 and 29
C 15 and 14
D 16 and 32

Answer: Option [A]
5 Consider a disk queue with I/O requests on the following cylinders in their arriving order : 6, 10, 12, 54, 97, 73, 128, 15, 44, 110, 34, 45 The disk head is assumed to be at cylinder 23 and moving in the direction of decreasing number of cylinders. Total number of cylinders in the disk is 150. The disk head movement using SCAN-scheduling algorithm is :
A 172
B 173
C 227
D 228

Answer: Option [B]
6 One of the disadvantages of user level threads compared to Kernel level threads is
A If a user level thread of a process executes a system call, all threads in that process are blocked
B Scheduling is application dependent
C Thread switching doesn’t require kernel mode privileges
D The library procedures invoked for thread management in user level threads are local procedures

Answer: Option [B]
7 Which statement is not correct about “init” process in Unix ?
A It is generally the parent of the login shell
B It has PID 1
C It is the first process in the system
D Init forks and execs a ‘getty’ process at every port connected to a terminal

Answer: Option [B]
8 Given the following two statements : A. L = {w|na(w) = nb(w)} is deterministic context free language, but not linear. B. L = {an bn} ∪ {an b2n} is linear, but not deterministic context free language. Which of the following options is correct ?
A Both (A) and (B) are false
B Both (A) and (B) are true
C (A) is true, (B) is false
D (A) is false, (B) is true

Answer: Option [B]
9 Which of the following pairs have different expressive power ?
A Single-tape-turing machine and multi-dimensional turing machine
B Multi-tape turing machine and multi-dimensional turing machine
C Deterministic push down automata and non-deterministic pushdown automata
D Deterministic finite automata and Non-deterministic finite automata

Answer: Option [B]
10 Which of the following statements is false ?
A Every context-sensitive language is recursive
B The set of all languages that are not recursively enumerable is countable
C The family of recursively enumerable languages is closed under union
D The families of recursively enumerable and recursive languages are closed under reversal

Answer: Option [B]
11 Let C be a binary linear code with minimum distance 2t + 1 then it can correct upto _____ bits of error.
A t + 1
B t
C t – 2
D t 2

Answer: Option [A]
12 A t-error correcting q-nary linear code must satisfy : M t Σ i = 0⎝ ⎛ ⎠ ⎞n i (q – 1)i ≤ X Where M is the number of code words and X is
A qn
B qt
C q–n
D q–t

Answer: Option [B]
13 Names of some of the Operating Systems are given below : (a) MS-DOS (b) XENIX (c) OS/2 In the above list, following operating systems didn’t provide multiuser facility.
A (a) only
B (a) and (b) only
C (b) and (c) only
D (a), (b) and (c)

Answer: Option [D]
14 From the given data below : a b b a a b b a a b which one of the following is not a word in the dictionary created by LZ-coding (the initial words are a, b) ?
A a b
B b b
C b a
D b a a b

Answer: Option [A]
15 With respect to a loop in the transportation table, which one of the following is not correct ?
A Every loop has an odd no. of cells and atleast 5
B Closed loops may or may not be square in shape
C All the cells in the loop that have a plus or minus sign, except the starting cell, must be occupied cells
D Every loop has an even no. of cells and atleast four

Answer: Option [B]
16 A neuron with 3 inputs has the weight vector [0.2 –0.1 0.1]T and a bias θ = 0. If the input vector is X = [0.2 0.4 0.2]T then the total input to the neuron is
A 0.20
B 1.0
C 0.02
D –1.0

Answer: Option [B]
17 Which of the following neural networks uses supervised learning ? (A) Multilayer perceptron (B) Self organizing feature map (C) Hopfield network
A (A) only
B (B) only
C (A) and (B) only
D (A) and (C) only

Answer: Option [B]
18 Unix command to change the case of first three lines of file “shortlist” from lower to upper
A $ tr ‘[a – z]’ ‘[A – Z]’ shortlist ¦ head-3
B $ head-3 shortlist ¦ tr ‘[a – z]’ ‘[A – Z]’
C $ tr head -3 shortlist ‘[A – Z]’ ‘[a – z]’
D $ tr shortlist head -3 ‘[a – z]’ ‘[A – Z]’

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]