SOLVED MCQS & SUBJECTIVE FROM MIDTERM PAPERS
December 2014
Virtual University of Pakistan
Bhakkar Campus (PBHK01) Pioneer College of Commerce Bhakkar
1. Localvariables of a function are stored in, Select correct option:
Binary Search Tree
Stack Queue AVLTree
2. Question # 2 of 5 ( Start time: 11:41:31 AM )
When an executable program run, it is loaded inthe memory and becomes a .
Select correct option: Thread
.h file
Process
Noneof the above
3. In_ the ‘next’ returns false when it reaches to the last node due to the fact thatthe next field of the last node is set to NULL.
Select correct option: Circular linked list Triple linked list
Singly linked list
None of the above
4. A kind of expressions where theoperator is present between two operands called
expressions.
Select correct option:
Infix Postfix Prefix
None of the above
5. Question # 1 of 5 ( Start time: 11:44:44 AM ) Total Marks: 1
Compiler uses which one of the following in Function calls,
Select correct option:
Stack
Queue
Binary Search Tree
AVL Tree
6. Stack and Queue can be implemented using , Select correct option:
Singly Link List
Binary Tree
Binary Search Tree
AVL Tree
7. Which one of the following is TRUE about recursion?
Select correct option:
Recursive function calls consume a lot of memory.
Recursion extensively uses stack memory. Recursion extensively uses stack memory. Iteration is more efficientthan iteration
9. Which boolean expression indicates whetherthe numbers in two nodes (p and q) are the same. Assume that neither p nor q is null.
Select correct option:
p == q
p.data == q.data p.nextNode == q. nextNode p.data == q
10. Whenever we call a function, the compiler makes
a stack, the top element of the stack is of the function. Select correct option:
First argument
Return address
Last argument notsure
None of the above
11. is the stack characteristic but _was implemented because of the size limitation of the array.
Select correct option: isFull(),isEmpty() pop(), push()
isEmpty() , isFull()
push(),pop()
13. The next field in the last node in asingly-linked list is set to . Select correct option:
0
1
NULL
false
14. The method of list will position the currentNode and lastCurrentNode at the start of the list.
Select correct option: Remove
Next
Start
Back
15. is the maximum number of nodes that you can have on a stack-linked list ? Select correct option:
Zero
2n (where n is the number of nodes in linked list)
Any Number
None of these
17. Which of the following operations returns top value of the stack? Select correct option:
push pop top first
18. Itwill be efficient to place stack elements at the start of the list because insertion and removal take _time.
Select correct option: Variable
Constant
Inconsistent
None of the above
19. A template is a function or class that is written with a data type. Select correct option:
Specific Definite Generic
Noneof the above.
21. To create a we link the last node with the first node in the list. Select correct option:
Double linked list Circularly-linked list Linked list
None of the above
22. In the calling function, after the execution of the function called,the program continues its execution form the _after the function call.
Select correct option: Previous line
Next line
Beginning
None of the above
26. Only removes items in reverse order as they were entered. Select correct option:
Queue
Stack
Both of these
None of these
27. A queue is a _data structure, whereas a stack isa data structure. Select correct option:
FIFO, LIFO LIFO,FIFO bothof these
none of these
28. 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 data items are stored in memory.