LATEST SOLVED MCQS & SUBJECTIVE FROM MIDTERM PAPERS
18 December 2014
Bhakkar Campus (PBHK01) Pioneer College of Commerce Bhakkar
1. The memory address of thefirst element of an array is called .
Floor address Foundation address First address Base address
2. reduces the burden ofmaintaining NULL pointer in the last node
Single linked list Doubly linked list Circular linked list None of the given
3. The order of operands in postfix is the _as that in the infix.
Different SameUnusual
None of the above
4. The next field in the last node in a singly-linked list is set to .
0
1
5. Two commonmodels of simulation are and .
Circuit-based simulation and Event-based simulation Circuit-based simulation and Time-based simulation Time-based simulationand Event-based simulation None of the above
6. A queue is a data structure where elements are
Inserted at one end and removedfrom the other
Inserted at the front and removed from the back. Inserted and removed from the top.
Inserted at the backand removed fromthe front. Inserted and removed from both ends.
7. Each node in singly linked list contains One pointer
Two pointers
No pointer
8. A queue is a data structure, whereas a stack is a _data structure. FIFO, LIFO
LIFO,FIFO
both of these none of these
9. Ifmemory address of first node in linked list is 1052 then 3rd node address will be . Note:
consider one node takes 1 byte.
1053 Not Sure
1054
1055
none of then
10. Which one of the following is TRUE about recursion? Recursion extensively uses stack memory.
Recursion extensively uses heap memory. Iteration is more efficient than iteration.
11. In array list the worst case of removing an element is
Toremove an element from the end of the list
o remove an element from the middle of the list
To remove an element from the startof the list
We cannot remove element froman array list
12. Each node in a singly linked list contains two fields, one field called data field while other field contains:
Pointer to an integer Pointer to character Pointer to next node
13. Suppose you are writing a class for Node classand forgot to write the constructor of the class, the
Compiler will give compile time error
Complier will give runtime error
Compiler will automatically generate a default constructor
14. Which of the following operation returns but do not removes top value of the stack?
push pop top
16. The principal benefit of a linked list over a conventional array is that the order of the linked items may be from the order that the dataitems are stored in memory. Select correct option:
Same Identical Different Equivalent
17. The next field inthe last node in a singly-linked list is set to . Select correct option:
0
1
null
false
18. Local variables of a function are stored in,
Binary Search Tree
Stack Queue AVL Tree
19. A template is a function or class that is written with a data type. Select correct option:
Specific Definite Generic
None of the above.
20. The expression DE+H* is called Select correct option:
Prefix expression Infix expression Postfix expression Hybrid expression
22. In , a programmer uses two pointers in the node, i.e. one to point to next node and the other to point to the previous node
Linked list doubly-link list array
25. In the linked list implementation of the stack class, where does the push member function places the newentry on the linked list?
After all other entries that are greater than the new entry.
At the head
After all other entries that are smaller than the new entry. At the tail
29. Consider the following infix expression. 7/8 + 9 If one converts the above expression into postfix, what would be the resultant expression?
7 8 9 / +
7 8 / + 9
/ 7 8 + 9
7 8 / 9 +
30. If numbers 5, 222, 4, 48 are inserted in a queue, which one will be removed first?
48
4
333
5
35. If we use an array for implementing list, then for simplicity, it is good to use the start index from .
-1
0
1
2
What will out of following postfixexpression? 313 476
None
The method of list will position
Start
STL is a that is a part………. C++
Lirary
Doubly linked list always has one NULL pointer
True
which of the following is not a data structure ?
Memory Cell