DataStructures Q1 070320241053

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

1. Which of the following information is stored in a doubly-linked list’s nodes? [D]

A) Value of node B) Address of next node C) Address of previous node D) All of the mentioned

2. What is the optimal time complexity to count the number of nodes in a linked list? [A]

A) O(n) B) O(1) C) O(logn) D) None of the mentioned

3. Which of the following are applications of linked lists? [D]

A) Implementing file systems B) Chaining in hash tables C) Binary Trees implementation D) All of the mentioned

4. Insertion of an element at the middle of a linked list requires the modification of how many pointers? [A]

A) 2 B) 1 C) 3 D) 4

5. Insertion of an element at the ends of a linked list requires the modification of how many pointers? [A]

A) 2 B) 1 C) 3 D) 4

6. In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element will be? [B]

A) O(log n) B) O(n) C) O(1) D) None of the mentioned

7. Which of the following algorithms is not feasible to implement in a linked list? [D]

A) Linear Search B) Merge Sort C) Insertion Sort D) Binary Search

8. A linked list node can be implemented using? [C]

A) Structs B) Class C) Both Structs and Class D) None of the mentioned

9. In which type of linked lists traversals can be performed in both directions? [B]

Page No.: 1
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) Singly Linked Lists B) Doubly Linked Lists C) Circular Linked Lists D) None of the mentioned

10. Which type of linked list stores the address of the head node in the next pointer of the last node? [D]

A) Singly Linked List B) Doubly Linked List C) Hashed List D) Circular Linked List

11. Which of the following sorting algorithms is preferred to sort a linked list? [A]

A) Merge Sort B) Quick Sort C) Insertion Sort D) None of the mentioned

12. Which of the following statements are true? [C]

A) delete is a keyword. B) free is a library function. C) Bothdelete is a keyword. and free is D) None of the mentioned
a library function.

13. Polynomial addition is implemented using which data structure? [B]

A) Queue B) Linked List C) Trees D) Stack

14. The type of pointer used to point to the address of the next element in a linked list? [C]

A) Pointer to character B) Pointer to integer C) Pointer to node D) None of the mentioned

15. A linear collection of data elements where the linear node is given by means of pointer is called? [A]

A) linked list B) node list C) primitive list D) None of the mentioned

16. Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, [D]
membership, cardinality will be the slowest?
A) union B) membership C) cardinality D) union, intersection

17. In linked list each node contain minimum of two fields. One field is data field to store the data second field is? [C]

A) Pointer to character B) Pointer to integer C) Pointer to node D) Node

18. The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used? [C]

A) Singly linked list B) Doubly linked list C) Circular doubly linked list D) Array implementation of list

19. A variant of linked list in which last node of the list points to the first node of the list is? [C]

Page No.: 2
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) Singly linked lis B) Doubly linked list C) Circular linked list D) Multiply linked list

20. In doubly linked lists, traversal can be performed? [C]

A) Only in forward direction B) Only in reverse direction C) In both directions D) None of the mentioned

21. A variant of the linked list in which none of the node contains NULL pointer is? [C]

A) Singly linked list B) Doubly linked list C) Circular linked list D) None of the mentioned

22. In circular linked list, insertion of node requires modification of? [B]

A) One pointer B) Two pointer C) Three pointer D) None of the mentioned

23. Linked lists are not suitable to for the implementation of? [D]

A) Insertion sort B) Radix sort C) Polynomial manipulation D) Binary search

24. In worst case, the number of comparison need to search a singly linked list of length n for a given element is [C]

A) log n B) n/2 C) n D) log2n-1

25. A circular linked list can be used for [C]

A) stack B) queue C) both stack & queue D) neither stack or queue

26. What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of [A]
the list?
A) θ (n) B) O(n) C) O(1) D) θ (1)

27. What would be the asymptotic time complexity to add an element in the linked list? [B]

A) O(1) B) O(n) C) O(n2) D) None of the mentioned

28. The last node in a singly linked list points to [A]

A) a null pointer B) the previous node C) the rst node in the list D) the last node does not contain a
pointer

29. A doubly linked list keeps track of the next node in the list as well as [D]

Page No.: 3
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) itself B) the head node C) the tail node D) the previous node

30. The __________ of a linked list points to the rst node in the list. [B]

A) starter B) head C) tail D) declaration

31. A linked list is a series of connected [D]

A) ADTs B) vectors C) algorithms D) Nodes

32. In a circular linked list, the last node points to the [C]

A) this pointer B) tail pointer C) first node D) middle node

33. Which of the following is not a stable sorting algorithm in its typical implementation. [C]

A) Insertion Sort B) Merge Sort C) Quick Sort D) Bubble Sort

34. Which of the following sorting algorithms in its typical implementation gives best performance when applied on an array which is sorted or [D]
almost sorted (maximum 1 or two elements are misplaced).
A) Quick Sort B) Heap Sort C) Merge Sort D) Insertion Sort

35. What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary search? [C]

A) N B) N*log(N) C) N2 D) N*log(N)2

36. Which is the correct order of the following algorithms with respect to their time Complexity in the best case ? [B]

A) Merge sort > Quick sort >Insertion sort > B) insertion sort < Quick sort < Merge sort C) Merge sort > selection sort > quick D) Merge sort > Quick sort > selection
selection sort < selection sort sort > insertion sort sort > insertion sort

37. Consider the array A[]= {6,4,8,1,3} apply the insertion sort to sort the array . Consider the cost associated with each sort is 25 rupees , what [A]
is the total cost of the insertion sort when element 1 reaches the first position of the array ?
A) 50 B) 25 C) 75 D) 100

38. Which of the following sorting algorithms has the lowest worst-case complexity? [A]

A) Merge Sort B) Bubble Sort C) Quick Sort D) Selection Sort

39. Which one of the following in-place sorting algorithms needs the minimum number of swaps? [D]

Page No.: 4
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) Insertion Sort B) Quick Sort C) Heap Sort D) Selection Sort

40. What is the best time complexity of bubble sort(optimised)? [C]

A) N^2 B) NlogN C) N D) N(logN)^2

41. The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 5, 13 in ascending order, using bubble sort is [D]

A) 11 B) 12 C) 13 D) 10

42. Bubble Sort is an example of a ______ sorting algorithm. [A]

A) Comparison - based B) Non-comparison-based C) Linear D) Exponential

43. What is the worst-case time complexity of the Bubble sort Algorithm? [C]

A) O(NlogN) B) O(N) C) O(N^2) D) None of the mentioned

44. In the following scenarios, when will you use selection sort? [C]

A) The input is already sorted B) A large file has to be sorted C) Large values need to be sorted with D) Small values need to be sorted with
small keys large keys

45. The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and selection sort respectively are __________ [A]

A) 5 and 4 B) 4 and 5 C) 2 and 4 D) 2 and 5

46. What is the best case complexity of selection sort? [D]

A) O(nlogn) B) O(logn) C) O(n) D) O(n2)

47. Consider a situation where swap operation is very costly. Which of the following sorting algorithms should be preferred so that the number [B]
of swap operations are minimized in general?
A) Heap Sort B) Selection Sort C) Insertion Sort D) Merge Sort

48. Suppose we are sorting an array of eight integers using heapsort, and we have just finished some heapify (either maxheapify or minheapify) [B]
operations. The array now looks like this: 16 14 15 10 12 27 28 How many heapify operations have been performed on r
A) 1 B) 2 C) 3 or 4 D) 5 or 6

49. You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate? [B]

Page No.: 5
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) Heap sort B) Merge sort C) Quick sort D) Insertion sort

50. Which sorting algorithms is most efficient to sort string consisting of ASCII characters? [D]

A) Quick sort B) Heap sort C) Merge sort D) Counting sort

51. Which of the following sorting algorithms has the minimum running time complexity in the best and average case? [A]

A) Insertion sort, Quick sort B) Quick sort, Quick sort C) Quick sort, Insertion sort D) Insertion sort, Insertion sort

52. Which sorting algorithm will take the least time when all elements of the input array are identical? Consider typical implementations of [A]
sorting algorithms.
A) Insertion Sort B) Heap sort C) Merge Sort D) Selection sort

53. Which of the following is good for sorting arrays having less than 100 elements? [D]

A) Quick Sort B) Selection Sort C) Merge Sort D) Insertion Sort

54. Which of the following real time examples is based on insertion sort? [A]

A) arranging a pack of playing cards B) database scenarios and distributes C) arranging books on a library shelf D) real-time systems
scenarios

55. In C, what are the basic loops required to perform an insertion sort? [C]

A) do- while B) if else C) for and while D) for and if

56. For the best case input, the running time of an insertion sort algorithm is? [A]

A) Linear B) Binary C) Quadratic D) Depends on the input

57. Which of the following examples represent the worst case input for an insertion sort? [B]

A) array in sorted order B) array sorted in reverse order C) normal unsorted array D) large array

58. What will be the number of passes to sort the elements using insertion sort? 14,12,16,6,3,10 [B]

A) 6 B) 5 C) 7 D) 1

59. Which of the following operations is performed more efficiently by doubly linked list than by singly linked list? [A]

Page No.: 6
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) Deleting a node whose location in given B) Searching of an unsorted list for a given C) Inverting a node after the node with D) Traversing a list to process each
item given location node

60. What is the maximum number of comparisons that can take place when a bubble sort algorithm is implemented?, suppose there are n [D]
elements in the array.
A) n^2 B) n (n +1) C) n(n-1) D) (n*(n-1))/2

61. Which of the following can be done with LinkedList? [D]

A) Implementation of Stacks and Queues. B) Implementation of Binary Trees. C) Implementation of Data Structures D) All of the mentioned
that can simulate Dynamic Arrays.

62. If new data needs to be added to a linked list, the program simply __________ and inserts it into the series. [A]

A) allocates another node B) removes a node C) borrows a node from the compiler D) None of the mentioned

63. Which of the following statements is true regarding Bubble Sort? [C]

A) It is the fastest sorting algorithm. B) It is suitable for sorting large datasets. C) It is an in-place sorting algorithm. D) It has a time complexity of O(n log n)
in all cases

64. Which sorting algorithm will take least time when all elements of input array are identical? Consider typical implementations of sorting [A]
algorithms.
A) Insertion Sort B) Heap Sort C) Merge Sort D) Selection Sort

65. How many comparisons are needed to sort an array of length 5 if a straight selection sort is used and array is already in the opposite order? [C]

A) 1 B) 5 C) 10 D) 20

66. What is the main drawback of the Bubble Sort algorithm? [C]

A) It is not stable. B) It is not comparison-based. C) It has a high time complexity. D) It is not adaptable to different data
types

67. Bubble Sort is an example of a sorting algorithm that: [C]

A) Uses divide and conquer strategy B) Uses dynamic programming C) Swaps adjacent elements directly D) Only works with integers

68. What is a data structure? [C]

A) A programming language B) A collection of algorithms C) A way to store and organize data D) A type of computer hardware

Page No.: 7
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

69. What are the disadvantages of arrays? [D]

A) Index value of an array can be negative B) Elements are sequentially accessed C) Data structure like queue or stack D) There are chances of wastage of
cannot be implemented memory space if elements inserted
in an array are lesser than the
allocated size

70. Which data structure is used for implementing recursion? [A]

A) Stack B) Queue C) List D) Array

71. The data structure required to check whether an expression contains a balanced parenthesis is? [B]

A) Queue B) Stack C) Tree D) Array

72. Which of the following statement(s) about stack data structure is/are NOT correct? [B]

A) Top of the Stack always contain the new B) Stack is the FIFO data structure C) Null link is present in the last node at D) Linked List are used for
node the bottom of the stack implementing Stacks

73. Which of the following points is/are not true about Linked List data structure when it is compared with an array? [B]

A) Random access is not allowed in a B) Access of elements in linked list takes C) Arrays have better cache locality that D) It is easy to insert and delete
typical implementation of Linked Lists less time than compared to arrays can make them better in terms of elements in Linked List
performance

74. What is a bit array? [A]

A) Data structure that compactly stores bits B) Data structure for representing arrays of C) Array in which elements are not D) An array in which most of the
records present in continuous locations elements have the same value

75. In simple chaining, what data structure is appropriate? [A]

A) Doubly linked list B) Circular linked list C) Singly linked list D) Binary trees

76. How do you initialize an array in C? [C]

A) int arr[3] = (1,2,3); B) int arr(3) = {1,2,3}; C) int arr[3] = {1,2,3}; D) int arr(3) = (1,2,3);

77. How do you instantiate an array in Java? [C]

A) int arr[] = new int(3); B) int arr[]; C) int arr[] = new int[3]; D) * int arr() = new int(3);

Page No.: 8
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

78. What are the advantages of arrays? [A]

A) Objects of mixed data types can be B) Elements in an array cannot be sorted C) Index of first element of an array is 1 D) Easier to store elements of same
stored data type

79. Assuming int is of 4bytes, what is the size of int arr[15]; [D]

A) 15 B) 19 C) 11 D) 60

80. Elements in an array are accessed _____________ [A]

A) randomly B) sequentially C) exponentially D) logarithmically

81. Which one of the following is an application of Queue Data Structure? [D]

A) When a resource is shared among B) When data is transferred C) Load Balancing D) All of the mentioned
multiple consumers. asynchronously (data not necessarily
received at same rate as sent) between
two processes

82. The time complexity used for inserting a node in a priority queue on the basis of key is: [A]

A) O(n) B) O(n2) C) O(nlogn) D) O(logn)

83. We can use a self–balancing binary search tree for implementing the: [B]

A) Hash table B) Priority queue C) Heap sort and Priority queue D) Heap sort

84. Assuming int is of 4bytes, what is the size of int arr[15];? [D]

A) 15 B) 19 C) 11 D) 60

85. In general, the index of the first element in an array is __________ [A]

A) 0 B) -1 C) 2 D) 1

86. Which of the following is not the application of stack? [D]

A) A parentheses balancing program B) Tracking of local variables at run time C) Compiler Syntax Analyzer D) Data Transfer between two
asynchronous process

87. Which of the following data structure is non-linear type? [D]

Page No.: 9
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) strings B) lists C) stacks D) None of the mentioned

88. To represent hierarchical relationship between elements, which data structure is suitable? [C]

A) Deque B) Priority C) Tree D) All of the mentioned

89. Which of the following data structure is linear type? [D]

A) Strings B) Lists C) Queues D) All of the mentioned

90. Two main measures for the efficiency of an algorithm are [C]

A) Processor and memory B) Complexity and capacity C) Time and space D) Data and space

91. The time factor when determining the efficiency of algorithm is measured by [B]

A) Counting microseconds B) Counting the number of key operations C) Counting the number of statements D) Counting the kilobytes of algorithm

92. The space factor when determining the efficiency of algorithm is measured by [A]

A) Counting the maximum memory needed B) Counting the minimum memory needed C) Counting the average memory D) Counting the maximum disk space
by the algorithm by the algorithm needed by the algorithm needed by the algorithm

93. Which of the following case does not exist in complexity theory [A]

A) Null case B) Best case C) Worst case D) Average case

94. The Worst case occur in linear search algorithm when [D]

A) Item is somewhere in the middle of the B) Item is not in the array at all C) Item is the last element in the array D) Item is the last element in the array
array or is not there at all

95. The Average case occur in linear search algorithm [A]

A) When Item is somewhere in the middle B) When Item is not in the array at all C) When Item is the last element in the D) When Item is the last element in the
of the array array array or is not there at all

96. The complexity of the average case of an algorithm is [A]

A) Much more complicated to analyze than B) Much more simpler to analyze than that C) Sometimes more complicated and D) None of the mentioned
that of worst case of worst case some other times simpler than that
of worst case

Page No.: 10
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

97. The complexity of linear search algorithm is [A]

A) O(n) B) O(log n) C) O(n^2) D) O(n log n)

98. The complexity of Binary search algorithm is [B]

A) O(n) B) O(log ) C) O(n^2) D) O(n log n)

99. The complexity of Bubble sort algorithm is [C]

A) O(n) B) O(log n) C) O(n^2) D) O(n log n)

100. which of the following is a linear data structure? [A]

A) array B) AVL trees C) binary trees D) graphs

101. from following which is not the operation of data structure? [A]

A) operations that manipulate data in some B) operations that perform computation C) operations that check for syntax D) operations that monitor an object for
way errors the occurance of a controlling event

102. The total number of comparisons in a bubble sort is [A]

A) O(n log n) B) O(2n) C) O(n^2) D) None of the mentioned

103. Which of the following abstract data types can be used to represent a many to many relation? [D]

A) tree B) Plex C) Graph D) Both Plex and Graph

104. A mathematical-model with a collection of operations defined on that model is called [B]

A) Data Structure B) Abstract Data Type C) Primitive Data Type D) Algorithm

105. Representation of data structure in memory is known as: [B]

A) Recursive B) Abstract data type C) File structure D) Storage structure

106. An ADT is defined to be a mathematical model of a user-defined type along with the collection of all ____________ operations on that model [C]

A) Cardinality B) Assignment C) Primitive D) Structured

107. The information about an array that is used in a program will be stored in [D]

Page No.: 11
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) symbol table B) activation record C) system table D) dope vector

108. Which of the following is not a stable sorting algorithm? [B]

A) Insertion sort B) Selection sort C) Bubble sort D) Merge sort

109. Which of the following is a stable sorting algorithm? [A]

A) Merge sort B) Typical in-place quick sort C) Heap sort D) Selection sort

110. Which of the following is not an in-place sorting algorithm? [D]

A) Selection sort B) Heap sort C) Quick sort D) Merge sort

111. Running merge sort on an array of size n which is already sorted is [B]

A) O(n) B) O(nlogn) C) O(n2) D) None of the mentioned

112. The time complexity of a quick sort algorithm which makes use of median, found by an O(n) algorithm, as pivot element is [B]

A) O(n2) B) O(nlogn) C) O(nloglogn) D) O(n)

113. A sorting technique is called stable if it [B]

A) Takes O(nlogn) times B) Maintains the relative order of C) Uses divide-and-conquer paradigm D) Takes O(n) space
occurrence of non-distinct elements

114. The worst-case occur in linear search algorithm when ……. [D]

A) Item is somewhere in the middle of the B) Item is not in the array at all C) Item is the last element in the array D) Item is the last element in the array
array or item is not there at all

115. If the number of records to be sorted is small, then …… sorting can be efficient. [C]

A) Merge B) Heap C) Selection D) Bubble

116. The complexity of the sorting algorithm measures the …… as a function of the number n of items to be sorter. [B]

A) average time B) running time C) average-case complexity D) case-complexity

117. Which of the following is not a limitation of binary search algorithm? [D]

Page No.: 12
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) must use a sorted array B) requirement of sorted array is expensive C) there must be a mechanism to D) binary search algorithm is not
when a lot of insertion and deletions are access middle element directly efficient when the data elements
needed more than 1500.

118. The Average case occurs in the linear search algorithm ……… [A]

A) when the item is somewhere in the B) when the item is not the array at all C) when the item is the last element in D) Item is the last element in the array
middle of the array the array or item is not there at all

119. Binary search algorithm cannot be applied to … [A]

A) sorted linked list B) sorted binary trees C) sorted linear array D) pointer array

120. Which of the following is not the required condition for a binary search algorithm? [C]

A) The list must be sorted B) There should be direct access to the C) There must be a mechanism to D) Number values should only be
middle element in any sublist delete and/or insert elements in the present
list.

121. …………order is the best possible for array sorting algorithm which sorts n item. [C]

A) O(n logn) B) O(n2) C) O(n+logn) D) O(logn)

122. Which if the following is/are the levels of implementation of data structure [D]

A) Abstract level B) Application level C) Implementation level D) All of the mentioned

123. Identify the data structure which allows deletions at both ends of the list but insertion at only one end. [A]

A) Input restricted dequeue B) Output restricted qequeue C) Priority queues D) Stack

124. Which matrix has most of the elements (not all) as Zero? [C]

A) Identity Matrix B) Unit Matrix C) Sparse Matrix D) Zero Matrix

125. …………… is not the component of the data structure. [D]

A) Operations B) Storage Structures C) Algorithms D) None of the mentioned

126. Which of the following is not the part of ADT description? [D]

A) Data B) Operations C) all of the mentioned D) None of the mentioned

Page No.: 13
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

127. Inserting an item into the stack when stack is not full is called …………. Operation and deletion of item form the stack, when stack is not [A]
empty is called ………..operation.
A) push, pop B) pop, push C) insert, delete D) delete, insert

128. Stack is also called as [A]

A) Last in first out B) First in last out C) Last in last out D) First in first out

129. Which of the following data structure can’t store the non-homogeneous data elements? [A]

A) Arrays B) Records C) Pointers D) Stacks

130. Who coined the term Sparse Matrix? [A]

A) Harry Markowitz B) James Sylvester C) Chris Messina D) Arthur Cayley

131. 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]

A) Queue linked list B) Stacks linked list C) Both of them D) None of the mentioned

132. A list which displays the relationship of adjacency between elements is said to be [C]

A) linear B) non linear C) linked list D) trees

133. …………………….. is a variable that can hold the address of the variables, structure and functions that are used in the program. [B]

A) Array B) Pointer C) Structure D) None of the mentioned

134. ……………… is the organization of the data in a computers memory or in a file. [B]

A) Array B) Data Structure C) Data Management D) Data Organization

135. Some examples of data structures are i) array ii) stack iii) queuei v) binary tree v) hybrid tree [A]

A) i, ii, iii and iv only B) ii, iii, iv and v only C) i, ii, iii and v only D) All i, ii, iii, iv and v

136. Which data structure allows deleting data elements from and inserting at rear? [B]

A) Stacks B) Queues C) Dequeues D) Binary search tree

137. Which of these best describes an array? [B]

Page No.: 14
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) A data structure that shows a B) Container of objects of similar types C) Arrays are immutable once initialised D) Array is not a data structure
hierarchical behavior

138. Which of the following concepts make extensive use of arrays? [D]

A) Binary trees B) Scheduling of processes C) Caching D) Spatial locality

139. hat are the disadvantages of arrays? [B]

A) Data structure like queue or stack cannot B) There are chances of wastage of C) Elements are sequentially accessed D) None of the mentioned
be implemented memory space if elements inserted in
an array are lesser than the allocated
size

140. Is O(n) the Worst case Time Complexity for addition of two Sparse Matrix? [B]

A) TRUE B) FALSE C) none of the mentioned D) All of the mentioned

141. Which of the following is not the method to represent Sparse Matrix? [D]

A) Dictionary of Keys B) Linked List C) Array D) Heap

142. Process of removing an element from stack is called __________ [D]

A) Create B) Push C) Evaluation D) Pop

143. In a stack, if a user tries to remove an element from an empty stack it is called _________ [A]

A) Underflow B) Empty collection C) Overflow D) Garbage Collection

144. Pushing an element into stack already having five elements and stack size of 5, then stack becomes ___________ [A]

A) Overflow B) Crash C) Underflow D) User flow

145. Process of inserting an element in stack is called ____________Create [B]

A) Top B) Push C) Evaluation D) Pop

146. You can use C as a procedural, as well as an object-oriented, language [A]

A) TRUE B) FALSE C) Maybe D) Can't say

Page No.: 15
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

147. Adding a derived class to a base class requires fundamental changes to the base class [B]

A) TRUE B) FALSE C) Maybe D) Can't say

148. Format flags may be combined using [A]

A) the bitwise OR operator (|) B) the logical OR operator (||) C) the bitwise AND operator (&) D) the logical AND operator (&&)

149. The use of the break statement in a switch statement is [A]

A) optional B) compulsory C) not allowed. It gives an error D) None of the mentioned


message

150. To expose a data member to the program, you must declare the data member in the _____ section of the class [C]

A) common B) exposed C) public D) unrestricted

151. Evaluate the following expression: 3 >6&&7>4 [B]

A) TRUE B) FALSE C) Maybe D) Can't say

152. Which of the following are valid characters for a numeric literal constant? [D]

A) a comma B) a dollar sign ($) C) a percent sign (%) D) None of the mentioned

153. A function that changes the state of the cout object is called a(n) _____ [C]

A) member B) adjuster C) manipulator D) operator

154. When the compiler cannot differentiate between two overloaded constructors, they are called [C]

A) overloaded B) destructed C) ambiguous D) dubious

155. Some Streams work with input, and some with output [A]

A) TRUE B) FALSE C) Maybe D) Can't say

156. If you design a class that needs special initialization tasks, you will want to design a(n) _____ [C]

A) housekeeping routine B) initializer C) constructor D) compiler

157. Which type of statement does not occur in computer programs? [C]

Page No.: 16
Subject Name & Code : Data Structures ( 23PC204B ) Exam Name : Q1

A) sequence B) loop C) denial D) selection

158. The newline character is always included between [C]

A) pair of parentheses B) pair of curly braces C) control string D) None of the mentioned

159. To be called object-oriented, a programming language must allow [C]

A) functions that return only a single value B) #include files C) inheritance D) All of the mentioned

160. The keyword used to define a structure is _____ [C]

A) stru B) stt C) struct D) structure

Page No.: 17

You might also like