CSD
54. _______ form of access is used to add and remove nodes from a queue A. LIFO,Last In First Out B. FIFO , First In First Out C. Both (a) and (c) D. None of these
B. FIFO , First In First Out
28. Which data structure allows deleting data elements from front and inserting at rear? A.Stacks B. Queues C. Deques D. Binary search tree
B. Queues
4. Finding the location of the element with a given value is: A. Traversal B. Search C. Sort D.None of above
B. Search
67. How many parts are there in a declaration statement? A.1 B.2 C. 3 D.4
C. 3
32. To represent hierarchical relationship between elements, which data structure is suitable? A. Deque B.Priority C. Tree D.All of above
C. Tree
The operation of processing each element in the list is known as A.Sorting B. Merging C. Inserting D.Traversal
D.Traversal
10. The memory address of fifth element of an array can be calculated by the formula A. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array B. LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array C. LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array D. None of above
A. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array
15. A variable P is called pointer if A. P contains the address of an element in DATA B.P points to the address of first element in DATA C.P can store only memory addresses D. P contain the DATA and the address of DATA
A. P contains the address of an element in DATA
52. A linked list index is ____ that represents the position of a node in a linked list. A. an Integer B.a variable C. a character D. a boolean
A. an Integer
8. The elements of an array are stored successively in memory cells because A. by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated B. the architecture of computer memory does not allow arrays to store other than serially C. both of above D.none of above
A. by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
5. Arrays are best data structures A. for relatively permanent collections of data B.for the size of the structure and the data in the structure are constantly changing C. for both of above situation D. for none of above situation
A. for relatively permanent collections of data
37. When converting binary tree into extended binary tree, all the original nodes in binary tree are A. internal nodes on extended tree B. external nodes on extended tree C. vanished on extended tree D. None of above
A. internal nodes on extended tree
11. Which of the following data structures are indexed structures? A. linear arrays B. linked lists C.both of above D. none of above
A. linear arrays
57. A _______ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out. A. queue linked list B.stacks linked list C. both of them D. neither of them
A. queue linked list
60. What happens when you push a new node onto a stack? A. the new node is placed at the front of the linked list. B. the new node is placed at the back of the linked list. C. the new node is placed at the middle of the linked list. D. No Changes happens
A. the new node is placed at the front of the linked list.
23. The situation when in a linked list START=NULL is A. underflow B. overflow C.housefull D. saturated
A. underflow
75. The reason for using pointer is ... Choose the false option from the following sentences A.Accessing arrays or string elements B.Dynamic memory allocation C.Implementing linked list,trees,graphs and many other data structures D.All are false
A.Accessing arrays or string elements
70. Which of the following is the feature of stack? A.All operations are at one end B.It cannot reuse its memory C.All elements are of different data types D.Any element can be accessed from it directly
A.All operations are at one end
16. Which of the following data structure can't store the non-homogeneous data elements? A.Arrays B. Records C. Pointers D. None
A.Arrays
66. Each entry in a linked list is called a _______ A.Link B.Node C.data structure D.array index
A.Link
48. The complexity of linear search algorithm is A.O(n) B.O(log n) C.O(n2) D. O(n log n)
A.O(n)
63. What member function places a new node at the end of the linked list? A.appendNode() B.addNode() C.displayNode() D.structNode()
A.appendNode()
72. To delete a dynamically allocated array named `a`, the correct statement is A.delete a; B.delete a[0]; C.delete []a; D.delete [0]a;
A.delete a;
64. The _______ function retrieves the value of the size member of the LinkedList class A.getSize() B.giveSize() C.seeSize() D.addSize()
A.getSize()
35. When representing any algebraic expression E which uses only binary operations in a 2-tree, A.the variable in E will appear as external nodes and operations in internal nodes B. the operations in E will appear as external nodes and variables in internal nodes C. the variables and operations in E will appear only in internal nodes D. the variables and operations in E will appear only in external nodes
A.the variable in E will appear as external nodes and operations in internal nodes
27. When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal would return A. FAEKCDBHG B. FAEKCDHGB C.EAFKHDCBG D.FEAKDCHBG
B. FAEKCDHGB
. Which of the following data structure is linear data structure? A.Trees B. Graphs C. Arrays D.none of the above
C. Arrays
33. A binary tree whose every node has either zero or two children is called A. Complete binary tree B.Binary search tree C. Extended binary tree D. None of above
C. Extended binary tree
39. Which of the following sorting algorithm is of divide-and-conquer type? A. Bubble sort B. Insertion sort C. Quick sort D. All of above
C. Quick sort
12. Which of the following is not the required condition for binary search algorithm? A.The list must be sorted B.there should be the direct access to the middle element in any sublist C. There must be mechanism to delete and/or insert elements in list D. none of above
C. There must be mechanism to delete and/or insert elements in list
65. Elements of an array are stored _______ in memory A.Periodical B.Sequentially C.Parallelly D.None of the above
B.Sequentially
17. Which of the following data structure store the non-homogeneous data elements? A.Arrays B. Records C.Pointers D.None
B. Records
40. An algorithm that calls itself directly or indirectly is known as A. Sub algorithm B. Recursion C. Polish notation D. Traversal algorithm
B. Recursion
51. Value of the first linked list index is _______ A.One B. Zero C. -1 D. None of these
B. Zero
14. Two dimensional arrays are also called A. tables arrays B. matrix arrays C.both of above D. none of above
B. matrix arrays
21. Binary search algorithm can not be applied to A. sorted linked list B. sorted binary trees C. sorted linear array D. pointer array
B. sorted binary trees
42. The in order traversal of tree will yield a sorted listing of elements of tree in A.Binary trees B.Binary search trees C. Heaps D. None of above
B.Binary search trees
43. In a Heap tree A.Values in a node is greater than every value in left sub tree and smaller than right sub tree B.Values in a node is greater than every value in children of it C. Both of above conditions applies D. None of above conditions applies
B.Values in a node is greater than every value in children of it
47. If every node u in G is adjacent to every other node v in G, A graph is said to be A. isolated B.complete C. finite D.strongly connected
B.complete
6. Linked lists are best suited A. for relatively permanent collections of data B.for the size of the structure and the data in the structure are constantly changing C. for both of above situation D. for none of above situation
B.for the size of the structure and the data in the structure are constantly changing
55. ______ form of access is used to add and remove nodes from a stack A. LIFO B.FIFO C. Both (a) and (b) D. None of these
A. LIFO
29. Identify the data structure which allows deletions at both ends of the list but insertion at only one en A. Input-restricted deque B.Output-restricted deque C. Priority queues D. None of above
A. Input-restricted deque
53. Why is the constructor of the LinkedList class empty? A. because initialization of data members of the LinkedList class is performed by the constructor of the LinkedList class. B. because initialization of data members of the LinkedList class is performed by the destructor of the LinkedList class. C. because initialization of data members of the QueueLinkedList class is performed by the constructor of the LinkedList class. D. because initialization of data members of the QueueLinkedList class is performed by the destructor of the LinkedList class
A. because initialization of data members of the LinkedList class is performed by the constructor of the LinkedList class.
31. Which of the following data structure is linear type? A. Strings B. Lists C. Queues D.All of above
D.All of above
49. The complexity of merge sort algorithm is a. A. O(n) B.O(log n) C.O(n2) D.O(n log n)
D.O(n log n)
68. _________ is the way you groups things together by placing one thing on top of another and then removing things one at a time from the top A.Array B.Stack C.Pointer D.All of the above
B.Stack
56. New nodes are added to the _____ of the queue. A.front B.back C.middle D.Both 1 and 2
B.back
59. The pop() member function determines if the stack is empty by calling the _____ member function A. removeback() B.isEmpty() C.removedfront() D.hasNext()
B.isEmpty()
22. When new data are to be inserted into a data structure, but there is no available space; this situation is usually called A. underflow B.overflow C.housefull D. saturated
B.overflow
73. To create a linked list, we can allocate space and make something point to it, by writing: struct-name *pointer-variable; Which of the following statement will correctly allocate the space A.pointer-variable = malloc(sizeof(*struct-name)); B.pointer-variable = malloc(sizeof(struct struct-name)); C. pointer-variable = alloc(sizeof(struct struct-name)); D.pointer-variable = alloc(sizeof(*struct-name));
B.pointer-variable = malloc(sizeof(struct struct-name));
62. A Linked list can grow and shrink in size dynamically at _______ A.Beginning B.run time C.Ending D.none of the above
B.run time
38. The post order traversal of a binary tree is DEBFC Find out the pre order traversal A.ABFCDE B. ADBFEC C. ABDECF D. ABDCEF
C. ABDECF
24. Which of the following is two way list? A.grounded header list B.circular header list C. linked list with header and trailer nodes D.doubly linked list
D.doubly linked list
20. Which of the following statement is false? A .Arrays are dense lists and static data structure B. data elements in linked list need not be stored in adjecent space in memory C. pointers store the next data element of a list D. linked lists are collection of the nodes that contain information part and next pointer
C. pointers store the next data element of a list
25. The term "push" and "pop" is related to the A.array B. lists C. stacks D. all of above
C. stacks
7. Each array declaration need not give, implicitly or explicitly, the information about A. the name of array B.the data type of array C. the first data from the set to be stored D. the index set of the array
C. the first data from the set to be stored
74. The size of a structure can be determined by a. size of variable name b. size of (struct tag) A.Only a B.Only b C.Both a and b D.None of these options
C.Both a and b
Which of the following data structure is non linear data structure? A.Arrays B. Linked lists C.Trees D.None of above
C.Trees
58. In an array queue, data is stored in an _____ element. A.Node B.linked list C.array D.constructor
C.array
19. The difference between linear array and a record is A. An array is suitable for homogeneous data but the data items in a record may have different data type B. In a record, there may not be a natural ordering in opposed to linear array. C. A record form a hierarchical structure but a linear array does not D. All of above
D. All of above
45. A connected graph T without any cycles is called A.a tree graph B.free tree C. a tree D. All of above
D. All of above
69. Pushdown list means: A.Stack B.Queue C.Linked list D. All of the above
D. All of the above
34. The depth of a complete binary tree is given by A.Dn = n log2n B.Dn = n log2n+1 C. Dn = log2n D. Dn = log2n+1
D. Dn = log2n+1
30. Which of the following data structure is non-linear type? A. Strings B. Lists C. Stacks D. None of above
D. None of above
18. Each data item in a record may be a group item composed of sub-items; those items which are indecomposable are called A.elementary items B.atoms C. scalars D. all of above
D. all of above
44. In a graph if e=[u, v], Then u and v are called A.endpoints of e B.adjacent nodes C. neighbors D. all of above
D. all of above
9. The memory address of the first element of an array is called A. floor address B.foundation address C. first address D. base address
D. base address
13. Which of the following is not a limitation of binary search algorithm? A. must use a sorted array B.requirement of sorted array is expensive when a lot of insertion and deletions are needed C.there must be a mechanism to access middle element directly D. binary search algorithm is not efficient when the data elements are more than 1000.
D. binary search algorithm is not efficient when the data elements are more than 1000.
46. In a graph if e=(u, v) means A.u is adjacent to v but v is not adjacent to u B.e begins at u and ends at v C. u is processor and v is successor D. both b and c
D. both b and c
36. A binary tree can easily be converted into q 2-tree A. by replacing each empty sub tree by a new internal node B.by inserting an internal nodes for non-empty node C. by inserting an external nodes for non-empty node D. by replacing each empty sub tree by a new external node
D. by replacing each empty sub tree by a new external node
41. In a binary tree, certain null entries are replaced by special pointers which point to nodes higher in the tree for efficiency. These special pointers are called A. Leaf B. branch C. path D. thread
D. thread
71. The five items: A, B, C, D and E are pushed in a stack,one after the other starting from A. The stack is popped four times and each element is inserted in a queue. Then two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is. A.A B.B C.C D.D
D.D
26. A data structure where elements can be added or removed at either end but not in the middle A.Linked lists B.Stacks C.Queues D.Deque
D.Deque
50. Which of the following case does not exist in complexity theory A.Best case B.Worst case C. Average case D.Null case
D.Null case