0% found this document useful (0 votes)
53 views

Chap 4 Data STRC MCQ

Computer data structure mcqs
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Chap 4 Data STRC MCQ

Computer data structure mcqs
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Chapter 4 : DATA STRUCTURES

1. is a specialized format for organizing and storing data


a) data structure b) primitive data structure c) sorting d)merging
2. is a method of storing the data in memory so that it can be used efficiently.
a) Array b)data structure c) sorting d)merging
3. Which operation is used to remove the data structure from memory space
a)create b)select c)update d)destroy
4. Which is the collection of homogeneous elements under the same name?
a) Array b)data structure c) stack d)queue
5. which data structure has linear relationship between data elements?
a) non linear b)linear c) stack d)queue
6. In which data structure every data item is connected to several other data items?
a) non linear b)linear c) stack d)queue
7. Array size should be_
a) negative number b)positive number c)null d)Zero
8. To find length of array we use
a)L=UB-LB+1 b)L=LB-UB+1 c)L=UB-LB d)L=LB-UB
9. The base address of an array is address of
a)UB b)LB c)UB-LB d)LB-UB
10. The formula to calculate address of an element of an array A is
a)loc(A[I])=base(I)+W(I-LB) b) loc(A[I])=base(A)+W(I-UB)
c) loc(A[I])=base(I)+W(I-UB) d) loc(A[I])=base(A)+W(I-LB)
11. Example for traversing in a linear array is
a)binary search b) linear search c)to find max element in an array
d)inserting an element at given position in an array
12. Binary search compares the element to be searched with element of an array
a) first element b) middle element c)last element d)all the element
13. In binary search method if search element is less then mid position then
a)high=mid-1 b)low=mid+1 c)high=mid+1 d)low=mid-1
14. Linear search compares the elements
a)one by one from beginning to end b) dividing array into two parts
c) only first and last position d) from low to mid position
15. In binary search the successful search is when_
a)A[mid]=ele b)A[i]=ele c)ele<A[mid] d) ele>A[mid]
16. for I=N-1 down to Pos is the loop for
a)deleting element in array b)inserting element in an array c) traversing d)both a and b
17. In operation all the elements are shifted into lower order position from the given position
a)deleting element in array b)inserting element in an array c) traversing d) binary searching
18. Which is not the sorting method?
a)heap sort b)quick sort c)shell sort d)linear sort
19. The memory address of element A[i][j] in row major order is
a)loc(A[i][j])=base(A)+W((i-LB)+n(j-LB)) b) loc(A[i][j])=base(A)+W(n(j-LB)+(i-LB))
c) loc(A[j][i])=base(A)+W(n(I-LB)+n(j-LB)) d) loc(A[i][j])=base(A)+W((I-LB)+n(j-LB))
20. The memory address of elements A[i][j] in column major element is
a)loc(A[i][j])=base(A)+W((I-LB)+m(j-LB)) b) loc(A[i][j])=base(A)+W(m(j-LB)+(i-LB))
c) loc(A[j][i])=base(A)+W(n(I-LB)+m(j-LB)) d) loc(A[i][j])=base(A)+W((I-LB)+m(j-LB))
21. The base address of an array is address of the a)A[1] b)A[n-
1] c)A[0] d)both a and b
22. Which data structure is used to implement queues, trees, graphs
a)stack b)list c)array d)None
23. In which data structure addition and deletion of element takes place from same position
a)stack b)list c)array d)queue
24. In stack the end is commonly referred as
a)Top b)bottom c)rear d)front
25. In stack the end opposite is known as
a)Top b)base c)rear d)front
26. In stack which element is removed first
a) element inserted at first b)most recently added element c)middle element d)second element
27. In which position of the stack element will be in longest time?
a)A[0] b)base c)top d)both a and b
28. Stack perform the operation
a)last in first out b)last in last out c)last in fast out d)first in first out
29. In which operation stack is not modified
a))push(item) b)pop() c)peek() d)none
30. What is the function of Peek() operation
a)removes top item from stack b) test stack is empty or not
c)returns the number of items in stack d)returns top item from stack but does not remove.
31. Push operation in stack is
a) First increases top position and insert element
b) first insert element and then increases top position
c) first decreases top position and insert element
d) first insert element and decrease the top position
32. Which of the following is not an application of stack.
a) rearranging railroad cars b) runtime memory management
c) multiprogramming platform d) conversion of infix expression into postfix and prefix expression
33. Example for infix expression
a)+ab b)a+b c)ab+ d)none
34. The condition top=-1in stack indicates
a) stack is full b)stack has one element c)stack overflow d)stack is empty
35. The condition top=n-1 in stack indicates
a) stack is full b)stack has one element c)stack underflow d)stack is empty
36. In which data structure addition of new element and removal of element takes place at different end
a) non linear b)linear c) stack d)queue
37. In Queue items are inserted at end
a) Top b)front c)rear d)bottom
38. In queue items are removed at end
a) Top b)front c)rear d)bottom
39. In queue we remove the element which is
a)least recently added b)most recently added c)both a and b d)none
40. Queue is also called as
a) last in first out b) first in last out c)first in first out d)first in first in
41. In queue which operation is generally called as push
a) enqueue b) dequeue c)push d)pop
42. Which condition indicates queue is empty
a)front=null b)rear=N c) front=rare d)both a and b
43. Which condition indicates only one element in queue
a)front=null b)rear=N c) front=rare d)rear=N-1
44. Various application software is based on data structure
a) linked list b)graph c) stack d)queue
45. In which of the following application queue data structure is used
a)simulation b) type scheduling algorithm c) print server routine d)all ofthese
46. In which data structure element can be inserted and removed in any position
a)simple queue b)circular queue c)priority queue d)double ended queue
47. In which queue addition and deletion takes place at both the ends
a)simple queue b)circular queue c)priority queue d)double ended queue
48. The dis advantage of array is
a)static structure b)dynamic structure c) variable d)both a and b
49. In which operation array elements are shifted into higher order positions
a)deletion b)insertion c)searching d)sorting
50. In which operation array elements are shifted into lower order positions
a)deletion b)insertion c)searching d)sorting
51. In linked list the position start gives the location of node
a)first b)last c)middle d)second
52. In linked list the pointer start position is also called as
a)NULL b)head c)Tail d)none
53. The link field of last node contains
a)NULL b)head c)Tail d)none
54. In linked list link field of every node contains
a) data of the node b)data of next node c)address of last node d)address of next node
55. In doubly linked list which node points to the address of previous node?
a) info b)frowc)back d)head
56. Which operation is not possible in linked list
a)sorting b)searching c)merging d)inserting
57. Pointer=new type[number_of_elements] is syntax for
a)pointer declaration b)allocate memory for single element
c)allocate memory for block element d)structure.
58. In which data structure each node is connected to several other nodes
a) non linear b)linear c) stack d)queue
59. Which data structure represents hierarchical relationship
a) non linear b)linear c) stack d)queue
60. Each node in a tree has child node
a)zero b)more c) both a and b d)no
61. Root node in a tree is at position
a)top b)bottom c)middle d)right
62. From node all the operations commence in tree
a)leaf b)child c)root d)internal
63. The edges in a graph having directions is called
a) undirected graph b)arcs c)digraph d)all the above
64. prefix expression of (A+B)*(C+D) is
a)*+AB+CD b)+AB*+CD c)AB+Cd+* d)+*AB+CD
65. Prefix expression of 2*3/(2-1)+5*3 is
a)*23-21/-53*1 b)23*21+/53*+ b)21*23-/35*+ d)-/53*+23*21
66. ele=stack[top] is for
a)pushb)pop c)enqueue d)dequeue
67. Prefix expression ofA+(B*C-(D/E^F)) is
a)ABC^/DEF* b)ABC*DEF^/ c)^/ABC*DEF d)*ABC/DEF^
68. During conversion of infix to postfix pop is done when appears
a)( b)) c)~ d)::
69. Each operator in postfix string refers to its operand in a string
a)previous 3 b)next 3 c)next 2 d)previous 2
70. 10, 20, 25, 35, 30 40 for the list which searching technique can be applied
a)binary search b)linear search c)both a and b d)none
71. Which operation access each data element exactly once
a)traversal b)insertion c)searching d)sorting
72. Stack can be represented using
a)array b) linked list c)both a and b d)none
73. In binary search when the element is searched either right half or the left half of anarray
a) element is found b)search element comparison matches
c)comparison does not match d) low position is less than high position
74. In searching if (loc>=0) is
a)unsuccessful search b) binary search
c) linear search d) successful search
75. Array with one row or one column is a
a)1D array b)2d array c)multi dimensional array d)both a and b
76. Which operation is used to change data in data structure
a)create b)destroy c)select d)update
77. The study of data structure mainly deals with
a)implementation of structure on computers b)mathematical description of structure
c) to determine amount of space in memory d)all of these
78. is a set of vertices and edges
a)tree b)graph c)queue d)stack
79. Which node is farthest node from root node
a) child node b)top node c)leaf node d) middle node
80. list in linked list contains unused nodes
a)Avail b)head c)null d)start
81. Dynamic memory is allocated using operator
a)create b)null c)new d)pointer
82. In which linked list it is not possible to access preceding nodes
a)singly b)doubly c)circular d)all of these
83. A text can be reversed using
a)tree b)graph c)queue d)stack
84. While ((j>=1) and (A[j]<A[j-1])) is the logic for
a) inserting element b)sorting element b)deleting element d)searching element
85. for i=0 to N-1 If(A[i]==ele) is logic for
a) inserting element b)sorting element b)deleting element d)searching element
86. The method of collecting deleted nodes into free storage is called
a) heap memory b) free memory c)garbage collection d)dynamiccollection
87. In queue insertion and deletion performed according to
a) FIFO b)FILOc)LIFO d)all of these
88. Which of the following data structure does not have different types
a) array b)linked list c) stack d)queue
89. If we try to delete node from the linked list which is empty is called
a)overflow b)underflow c)inserting d)deleting
90. linked list is called as two way list a)singly
b)doubly c)circular d)none
91. As user navigate from web page to web page then the pages are placed on
a) array b)linked list c) stack d)queue
92. The operators in between two operands are called as expression
a)infix b)postfix c)prefix d)arthematic
93. If an operator precedes two operands it is called as expressiona)infix
b)postfix c)prefix d)arthematic
94. If an operator follows the two operands it is called as expression
a)infix b)postfix c)prefix d)arthematic
95. for i=lb to ub Process (A[i]) is logic for
a) inserting element b)sorting element b)deleting element d)traversing
96. Which data structure directly operates on machine level instructions
a)int b)array c)string d)trees
97. Which is not the operation on linear data structure
a) inserting b)sorting b)updating d)traversing
98. What is the statement to copy the top element into variable
a)s[top]=ele b)ele=s[top] c)s[++top]=ele d)both a and b
99. What is the statement to copy the variable element into rear position in queue
a)q[rear]=ele b)q[front]=ele c)ele=q[rear] d)ele=q[front]
100. tree is a tree which at most two decedents
a) binary tree b)sub tree c)b+ tree d)full
********************

You might also like