A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Important Notice!

Dear users, compscibits.com is now permanently moved to compsciedu.com. Please update all your links and bookmarks accordingly. Soon, the site will be accessible through URL compsciedu.com only.

101. Which of the following is used to make an Abstract class ?
a. Making atleast one member function as pure virtual function
b. Making atleast one member function as virtual function
c. Declaring as Abstract class using virtual keyword
d. Declaring as Abstract class using static keyword
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Making atleast one member function as pure virtual function

102. Match the following with reference to object oriented modelling :

List - I                         List - II

(a) Polymorphism        (i) Picking both operator and attributes with
operations appropriate to model an object
(b) Inheritance             (ii) Hiding implementation details of methods
from users of objects
(c) Encapsulation        (iii) Using similar operations to do similar things
(d) Abstraction              (iv) Create new classes from existing class

Codes :
      (a)   (b)  (c)   (d)
a. (iv)  (iii)   (i)   (ii)
b. (iii)  (iv)   (i)   (ii)
c. (iii)  (i)     (ii)  (iv)
d. (iv)  (iii)   (ii)  (i)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).(iii)  (iv)   (i)   (ii)

103. Which of the following is/are correct with reference to Abstract class and interface ?

(a) A class can inherit only one Abstract class but may inherit several interfaces.
(b) An Abstract class can provide complete and default code but an interface has no code.
a. (a) is true
b. (b) is true
c. Both (a) and (b) are true
d. Neither (a) nor (b) is true
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Both (a) and (b) are true

104. Consider the following conditions :

(a) The solution must be feasible, i.e. it must satisfy all the supply and demand constraints.
(b) The number of positive allocations must be equal to m+n-1, where m is the number
of rows and n is the number of columns.
(c) All the positive allocations must be in independent positions.

The initial solution of a transportation problem is said to be non-degenerate basic feasible solution if it satisfies :
a. (a) and (b) only
b. (a) and (c) only
c. (b) and (c) only
d. (a), (b) and (c)
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).(a), (b) and (c)

105. Consider the following transportation problem. The transportation cost in the initial basic feasible solution of the above transportation problem using Vogel’s Approximation method is :
a. 1450
b. 1465
c. 1480
d. 1520
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).1465

106. Big-O estimates for the factorial function and the logarithm of the factorial function i.e. n! and log n! is given by
a. O(n!) and O(n log n)
b. O(n^n) and O(n log n)
c. O(n!) and O(log n!)
d. O(n^n) and O(log n!)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).O(n^n) and O(n log n)

107. Match the following:

List-I                                       List-II
a. Classification           i. Principal Component Analysis
b. Clustering                 ii. Branch and Bound
c. Feature Extraction   iii. K-nearest neighbour
d. Feature Selection   iv. K-means

Codes:
      a    b    c    d
a. iii   iv    ii     i
b. iv   iii    i     ii
c. iii   iv    i     ii
d. iv   iii    ii    i
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).iii   iv    i     ii

108. Merge sort makes two recursive calls. Which statement is true after these two recursive calls finish, but before the merge step?
a. The array elements from a heap
b. Elements in each half of the array are sorted amongst themselves
c. Elements in the first half of the array are less than or equal to elements in second half of the array
d. All of the above
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Elements in each half of the array are sorted amongst themselves

109. Searching for an element in the hash table requires O(1) time for the ............... time, whereas for direct addressing it holds for the ............. time.
a. worst-case, average
b. worst-case, worst-case
c. average, worst-case
d. best, average
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).average, worst-case

110. An algorithm is made up of 2 modules M1 and M2. If time complexity of  modules M1 and M2 are h(n) and g(n) respectively, the time complexity of the algorithm is
a. min (h(n),g(n))
b. max (h(n),g(n))
c. h(n) + g(n)
d. h(n) * g(n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).max (h(n),g(n))