1. Each element of an array arr[20] [50] requires 4 bytes of storage. Base address of arr is 2000. The location of arr[10][10] when the array is stored as column major is
-
2820
2840
4048
2. What is a bit array?
-
Data structure that compactly stores bits
An array in which most of the elements have the same value
Data structure for representing arrays of records
3. Which if the following is/are the levels of implementation of data structure
-
abstract level
application level
implementation level
4. In C language, malloc() returns
-
integer pointer
structure pointer
null pointer
5. In a circular queue the value of r will be ..
-
r=r+1
r=(r+1)% [queue_size – 1]
r=(r+1)% queue_size
6. Data structure that compactly stores bits -
-
Bloom filter
For the allocation of memory pages
Used by the Linux kernel
7. Which of the following is the best time for an algorithm ?
-
O(n)
O(log, n)
0 (2")
8. The advantage of …………….. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists.
-
lists
linked lists
trees
9. Four algo.s do the same task. Which algo. should execute the slowest for large values of n?
-
O(n²)
O(n).
O(log, n)
10. Arrays are best data structures
-
for relatively permanent collections of data
for the size of the structure and the data in the structure are constantly changing
for both of above situation
11. What is a dynamic array?
-
A variable size data structure
dynamic array is a variable size data structure
The memory to the array is allocated at runtime
12. In C language, arrays are stored in which representation?
-
Column major
Row major
Layer major
13. What are some of the disadvantages of parallel arrays?
-
Very little direct language support
Expensive to shrink or grow
Poor locality of reference for non-sequential access
14. The disadvantage in using a circular linked list is …………………….
-
it is possible to get into infinite loop.
last node points to first node.
time consuming
15. Which of the following algorithm should execute the slowest for large values of N?
-
O (N)
O (N²)
O(log₂N)
16. node.next -> node.next.next; will make
-
node.next inaccessible
node.next.next inaccessible
this node inaccessible
17. What is a sorted array?
-
Arrays sorted in numerical order
Arrays sorted in alphabetical order
Elements of the array are placed at equally spaced addresses in the memory
18. Which is better computing time (in analysis of algorithm)?
-
O(n)
O(2n)
O(log 2n)
19. Which of the following property does not hold for matrix multiplication?
-
Commutative
Distributive
Associative
20. A circular linked list can be used for
-
stack
queue
both stack & queue
21. A dynamic data structure where we can search for desired records in O(logn) time is
-
heap
binary search tree
circularly linked list
22. If a list contains no elements it is said to be
-
hollow
empty
finite
23. Matrix A when multiplied with Matrix C gives the Identity matrix I, what is C ?
-
Identity matrix
Inverse of A
Transpose of A
24. For Column Major, what is the address of [3, 2] th element of a 3x 4 Matrix (contains integer number)? It is given that the Base Address is 2000
25. Data Structure is a systematic way to organize data in order to use it efficiently.
-
True
False
26. The number of possible binary search trees with 3 nodes is
27. Which of the following expressions access the (i, j)th entry of a (mx n) matrix stored in column major order?
-
nx (i-1) +j c) mx (n-j) +j
mx (j-1) +i d) nx (m-i) +j
28. Which of the following traversal techniques lists the nodes of a binary search tree in ascending order?
-
post-order
in-order
pre-order
29. Linked list uses
-
random memory allocation
static memory allocation
fixed memory allocation
30. Which of the following is non-linear data structure?
-
Stacks
List
Strings
- data structure mcq with answers pdf download
- data structures mcq pdf
- data structure mcq online test with answers
- data structures mcq questions
- data structures mcqs indiabix
- data structure mcq questions and answers
- data structures mcqs for placement
- data structure mcq geeksforgeeks
Post a Comment
0 Comments