Friday, August 7, 2015

Objective Questions(21-30)

21) Find True statement
a. Quicksort is often faster in practice than other O(n log n) algorithms.
b. quicksort's sequential and localized memory references work well with a cache.
c. Quicksort is a comparison sort and, in efficient implementations, is not a stable sort
d. all are true

22) heap sort need _____ auxiliary space and merge sort need ______ auxiliary space.
a. n, 1
b. 1, n
c. n,n
d. None of the above

23. Find the wrong statement out A,B and C are reg. exp.

a. A(B+C)=AB+AC
b. (A+B)C=AC+BC
c. (A+B)C = CA + CB
d. None
24. Set of all string that contain 1011
a. 1011(1+0)*
b. (1+0)*1011
c. (1+0)*1011(1+0)*
d. none of the above
c; even all expressions contains 1011; it should satisfy all strings which contain 1011; ex: 01011 is not satisfy 1011(1+0)* similarly 10110 is not satisfy by (1+0)*1011.
25. Smallest DFA that is equivalent to an ________ states of NFA.
a. n+1
b. nxn
c. n^2
d. None of the above
26. Automatic Garbage collection invoked when:
a. By the OS when OS need more memory
b. When process terminates
c. When program run out of heap
d. None of the above
27. The set of all strings that contain exactly three 1's
a. (1+0)*111(1+0)*
b. 111
c. 111(1+0)*
d. None of the above
Its ans is 0*10*10*10
28. A template can be used to create a family
of ?
a. Classes
b. Functions
c. Class and function
d. None of these
29. The ability to modify the data structure and not have to change the programs using that data is called:
A )data dictionary
B )data independence
C )data integrity
D )referential integrity
30. What is the precision of float data type in c++
1. 8
2.6
3.7
4.5
 

No comments:

Post a Comment