Computer Science MCQs | Computer Science Multiple Choice Questions with Answers

Questions
1 Implicit return type of a class constructor is :
A not of class type itself
B class type itself
C a destructor of class type
D a destructor not of class type

Answer: Option [A]
2 It is possible to define a class within a class termed as nested class. There are _____ types of nested classes.
A 2
B 3
C 4
D 5

Answer: Option [B]
3 Which of the following statements is correct ?
A Aggregation is a strong type of association between two classes with full ownership
B Aggregation is a strong type of association between two classes with partial ownership
C Aggregation is a weak type of association between two classes with partial ownership
D Aggregation is a weak type of association between two classes with full ownership

Answer: Option [D]
4 Which of the following statements is correct ?
A Every class containing abstract method must not be declared abstract
B Abstract class cannot be directly initiated with ‘new’ operator
C Abstract class cannot be initiated
D Abstract class contains definition of implementation

Answer: Option [A]
5 Which of the following statements is not correct ?
A HTML is not screen precise formatting language
B HTML does not specify a logic
C DHTML is used for developing highly interactive web pages
D HTML is a programming language

Answer: Option [B]
6 When one object reference variable is assigned to another object reference variable then
A a copy of the object is created
B a copy of the reference is created
C a copy of the reference is not created
D it is illegal to assign one object reference variable to another object reference variable

Answer: Option [B]
7 A server crashes on the average once in 30 days, that is, the Mean Time Between Failures (MTBF) is 30 days. When this happens, it takes 12 hours to reboot it, that is, the Mean Time to Repair (MTTR) is 12 hours. The availability of server with these reliability data values is approximately :
A 96.3%
B 97.3%
C 98.3%
D 99.3%

Answer: Option [B]
8 Software safety is quality assurance activity that focuses on hazards that
A affect the reliability of a software component
B may cause an entire system to fail
C may result from user input errors
D prevent profitable marketing of the final product

Answer: Option [B]
9 Which of the following sets represent five stages defined by Capability Maturity Model (CMM) in increasing order of maturity ?
A Initial, Defined, Repeatable, Managed, Optimized
B Initial, Repeatable, Defined, Managed, Optimized
C Initial, Defined, Managed, Repeatable, Optimized
D Initial, Repeatable, Managed, Defined, Optimized

Answer: Option [B]
10 The number of function points of a proposed system is calculated as 500. Suppose that the system is planned to be developed in Java and the LOC/FP ratio of Java is 50. Estimate the effort (E) required to complete the project using the effort formula of basic COCOMO given below : E = a(KLOC)b Assume that the values of a and b are 2.5 and 1.0 respectively.
A 25 person months
B 75 person months
C 62.5 person months
D 72.5 person months

Answer: Option [B]
11 In UNIX, processes that have finished execution but have not yet had their status collected are known as _________.
A Sleeping processes
B Stopped processes
C Zombie processes
D Orphan processes

Answer: Option [A]
12 In Unix operating system, when a process creates a new process using the fork () system call, which of the following state is shared between the parent process and child process ?
A Heap
B Stack
C Shared memory segments
D Both Heap and Stack

Answer: Option [B]
13 Which of the following information about the UNIX file system is not correct ?
A Super block contains the number of i-nodes, the number of disk blocks, and the start of the list of free disk blocks
B An i-node contains accounting information as well as enough information to locate all the disk blocks that holds the file’s data
C Each i-node is 256-bytes long
D All the files and directories are stored in data blocks

Answer: Option [D]
14 Which of the following option with reference to UNIX operating system is not correct ?
A INT signal is sent by the terminal driver when one types and it is a request to terminate the current operation
B TERM is a request to terminate execution completely. The receiving process will clean up its state and exit
C QUIT is similar to TERM, except that it defaults to producing a core dump if not caught
D KILL is a blockable signal

Answer: Option [A]
15 A multicomputer with 256 CPUs is organized as 16 × 16 grid. What is the worst case delay (in hops) that a message might have to take ?
A 16
B 15
C 32
D 30

Answer: Option [B]
16 Suppose that the time to do a null remote procedure call (RPC) (i.e. 0 data bytes) is 1.0 msec, with an additional 1.5 msec for every 1K of data. How long does it take to read 32 K from the file server as 32 1K RPCs ?
A 49 msec
B 80 msec
C 48 msec
D 100 msec

Answer: Option [B]
17 Let L be the language generated by regular expression 0*10* and accepted by the deterministic finite automata M. Consider the relation RM defined by M. As all states are reachable from the start state, RM has _____ equivalence classes.
A 2
B 4
C 5
D 6

Answer: Option [B]
18 Let L = {0n1n|n ≥ 0} be a context free language. Which of the following is correct ?
A – L is context free and Lk is not context free for any k ≥ 1
B – L is not context free and Lk is context free for any k ≥ 1
C Both – L and Lk is for any k ≥ 1 are context free
D Both – L and Lk is for any k ≥ 1 are not context free

Answer: Option [B]
19 Which of the following is used for the boundary representation of an image object ?
A Quad Tree
B Projections
C Run length coding
D Chain codes

Answer: Option [B]
20 The region of feasible solution of a linear programming problem has a _____ property in geometry, provided the feasible solution of the problem exists.
A concavity
B convexity
C quadratic
D polyhedron

Answer: Option [B]