Sunday 17 December 2017

CS301 Solved Midterm MCQS BY Moaz And Shahid

Question No: 1 ( Marks: 1 ) - Please choose one A queue where the de-queue operation depends not on FIFO, is called a priority queue 

► False
True (Page 101)

Question No: 2 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should 

► Use better data structures
Increase the hard disk space (Page 5)
► Use the better algorithm
► Use as much data as we can store on the hard disk

Question No: 3 ( Marks: 1 ) - Please choose one Consider the function 

X as under int X (int& Value) { return Value; } Now a and b are integers in a calling function. Which one of the following is a valid call to the above function X. 

► a = X (b) ;
a = X (&b) ;
► a = X (*b) ;
► None of the given options

Question No: 4 ( Marks: 1 ) - Please choose one In the call by value methodology, a copy of the object is passed to the called function.

► False
True (Page 202)

Question No: 5 ( Marks: 1 ) - Please choose one The tree data structure is a 

► Linear data structure
Non-linear data structure (Page 112) 
► Graphical data structure
► Data structure like queue

Question No: 6 ( Marks: 1 ) - Please choose one When should you use a const reference parameter? 

► Whenever the parameter has huge size.
► Whenever the parameter has huge size, the function changes the parameter within its body, and you do NOT want these changes to alter the actual argument.
► Whenever the parameter has huge size, the function changes the parameter within its body, and you DO want these changes to alter the actual argument.
► Whenever the parameter has huge size, and the function does not change the parameter within its body.

Question No: 7 ( Marks: 1 ) - Please choose one What is the maximum depth of recursive calls a function may make? 

► 1
► 2
► n (where n is the argument)
There is no fixed maximum

Question No: 8 ( Marks: 1 ) - Please choose one Suppose n is the number of nodes in a complete Binary Tree then maximum steps required for a search operation are, 

Log2 (n+1) -1 (Page 139)
► Log2 (n+1)
► Log2 (n) – 1
► Log2 (n)

Question No: 9 ( Marks: 1 ) - Please choose one In the linked list implementation of the stack class, where does the push member function places the new entry on the linked list? 

At the head (Page 53)
► At the tail
► After all other entries that are greater than the new entry.
► After all other entries that are smaller than the new entry.

Question No: 10 ( Marks: 1 ) - The expression AB+C* is called? 

► Prefix expression
Postfix expression (Page 70)
► Infix expression
► None of these

Mega File Of CS301 MCQS BY Moaz Download From Here


No comments:

Post a Comment