CLICK HERE FOR VARIOUS NEW JOBS 
CLICK HERE FOR VARIOUS EDUCATIONAL NEWS 
CLICK HERE FOR NEW SCHOLARSHIPS 
CLICK HERE FOR ADMISSION NOTICES 
Click And Follow On Google+ To Get Updates
Please Wait 10 Seconds... OR You CanSkip

ADMISSION NOTICES
Scholarships

Scholarship-300x291

BUDGET 2014-15
budget_2014-2015
New Date Sheets
VU SOLVED ASSIGNMENTS
Recent Posts

Posts Tagged ‘VU CS301 -Data structure MIDTERM Solved/Unsolved Papers Spring 2009’

VU CS301 -Data structure MIDTERM Solved/Unsolved Papers Spring 2009

VU CS301 -Data Structure MIDTERM Solved/Unsolved Papers Spring 2009

MIDTERM EXAMINATION

Spring 2009

Question No: 1 ( Marks: 1 ) – Please choose one

Which one of the following is a valid postfix expression?
► ab+c*d-

► abc*+d-   (According to rule)

► abc+*d-

► (abc*)+d-

Question No: 2 ( 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: 3 ( Marks: 1 ) – Please choose one

A Compound Data Structure is the data structure which can have multiple data items of same type or of different types.Which of the following can be considered compound data structure?

► Arrays            Click here for detail

► LinkLists

► Binary Search Trees

► All of the given options

Question No: 4 ( Marks: 1 ) – Please choose one

Suppose a pointer has been declared in main but has not assigned any variable address then ►That pointer points to First byte in main function

►That pointer contains a NULL value

►None of these

►That pointer points to any memory address

Question No: 5 ( Marks: 1 ) – Please choose one

Here is the start of a C++ class declaration:
class foo

{

public:

void x(foo f);

void y(const foo f);
void z(foo f) const;

Which of the three member functions can alter the PRIVATE member variables of the foo object that activates the function?

►Only x can alter the private member variables of the object that activates the function.

►Only y can alter the private member variables of the object that activates the function.
►Only z can alter the private member variables of the object that activates the function.

 

 

 

►Two of the functions can alter the private member variables of the object that activates the function.

Only the x and y can alter the private member variable of the foo class object. Last Option is more correct but not exact. In the last option the two function name are not mentioned

Question No: 6 ( Marks: 1 ) – Please choose one

The operation for removing an entry from a stack is traditionally called: ► delete

► peek

► pop     (Page 53)

► remove

Question No: 7 ( Marks: 1 ) – Please choose one

Which statement of the following statements is incorrect? ► Lists can be implemented by using arrays or linked lists ► A list is a sequence of one or more data items

► Stack is a special kind of list in which all insertions and deletions take place at one end

► Stacks are easier to implement than lists

Question No: 8 ( Marks: 1 ) – Please choose one

Parameters in function call are passed using,

► Stack    (Page 80)

► Queue

► Binary Search Tree
► AVL Tree

Question No: 9 ( Marks: 1 ) – Please choose one

Consider the following sequence of push operations in a stack: stack.push(’7’);

stack.push(’8’);
stack.push(’9’);
stack.push(’10’);
stack.push(’11’);
stack.push(’12’);

►7 8 9 10 11 12

►9 8 11 10 7 12
►9 10 8 11 12 7
►9 10 8 12 7 11

Question No: 10 ( 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: 11 ( Marks: 1 ) – Please choose one
Consider the following function:

void test_a(int n)

{

cout << n << ” “;
if (n>0)

test_a(n-2);
}

What is printed by the call test_a(4)?

► 4 2 0

► 0 2 4
► 0 2
► 2 4

Question No: 12 ( Marks: 1 ) – Please choose one

Queue follows,

► Last in First out
► First in Last out

► First in First out      (Page 87)

► None of these

Question No: 13 ( Marks: 1 ) – Please choose one

is a binary tree where every node has a value, every node’s left subtree contains only values less than or equal to the node’s value, and every node’s right subtree contains only values that are greater then or equal ?

►Strictly Binary Tree

►Binary Search tree        Click here for detail

►AVL tree
►All of these

Question No: 14 ( Marks: 1 ) – Please choose one

Four statements about trees are below. Three of them are correct. Which one is INCORRECT?

►Trees are recursively defined multi-dimensional data structures    Click here for detail

►The order of a tree indicates a maximum number of childen allowed at each node of the tree ►A search tree is a special type of tree where all values (i.e. keys) are ordered
►If Tree1’s size is greater than Tree2’s size, then the height of Tree1 must also be greater than
Tree2’s height.

Question No: 15 ( Marks: 1 ) – Please choose one

Below is a binary search tree. If we delete the value 50 using the algorithm we discussed, what value will be in the root of the remaining tree?

► 50

► 60
► 70
► 80

 

 

Question No: 16 ( Marks: 1 ) – Please choose one

Is a data structure that can grow easily dynamically at run time without having to copy existing elements? ► Array

► List

► Both of these
► None of these

VU CS301 -Data Structure MIDTERM Solved/Unsolved Papers Spring 2009

VU CS301 -Data structure MIDTERM Solved/Unsolved Papers Spring 2009

VU CS301 -Data Structure MIDTERM Solved/Unsolved Papers Spring 2009

MIDTERM EXAMINATION

Spring 2009

Question No: 1    ( Marks: 1 )    – Please choose one

Which one of the following statement is NOT correct .

►  In linked list the elements are necessarily to be contiguous           Click here for detail

►  In linked list the elements may locate at far positions in the memory

► In linked list each element also has the address of the element next to it ► In an array the elements are contiguous

Question No: 2    ( Marks: 1 )    – Please choose one

In a program a reference variable, say x, can be declared as
►  int &x ;

►  int *x ;

►  int x ;

► None of the given options

Question No: 3    ( Marks: 1 )    – Please choose one

Linked lists are collections of data items “lined up in a row” , insertions and deletions can be made only

at the front and the back of a linked list.

► True

► False

Question No: 4    ( Marks: 1 )    – Please choose one

A Linear Data Structure is the data structure in which data elements are arranged in a sequence or a linear list. Which of the following is Non Linear Data Structure?

► Arrays

► LinkLists

► Binary Search Trees

► None of these

 

Question No: 5    ( 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: 6    ( Marks: 1 )    – Please choose one

Which one of the following statements is correct?

►Array size is fixed once it is created           Click here for detail

►Link List size is fixed once it is created.

►Binary Search Tree size isfixed once it is created
►AVL Tree size is fixed once it is created

Question No: 7    ( Marks: 1 )    – Please choose one

Which one of the following is correct about pointers? ►They always point todifferent memory locations ►They may point to a singlememory location
►The address of two pointer variables is same
►None of these

Question No: 8    ( Marks: 1 )    – Please choose one

Which of the following abstract data types are NOT used by Integer Abstract Data type group? ►short

►Int

►float Click here for detail
►long

Question No: 9    ( Marks: 1 )    – Please choose one

The operation for adding an entry to a stack is traditionally called : ►add

►append
►insert

►push        (Page 53)

Question No: 10    ( Marks: 1 )    – Please choose one

The operation for removing an entry from a stack is traditionally called:

►delete

►peek

►pop         (Page 53)

►remove

Question No: 11    ( Marks: 1 )    – Please choose one

We can add elements in QUEUE From _________
►Front

►Rear    (Page 91)

►From Both Rare and Front
►None of these

 

 

Question No: 12    ( Marks: 1 )    – Please choose one

The difference between a binary tree and a binary search tree is that ,a binary search tree has

►two children per node whereas a binary tree can have none, one, or two children per node  Click here for

detail

 ►in binary search tree nodes are inserted based on the values they contain ►in binary tree nodes are inserted based on the values they contain
►none of these

Question No: 13    ( 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)

►Log2 (n+1)
►Log2 (n) – 1
►Log2 (n)

Question No: 14    ( Marks: 1 )    – Please choose one

The following is a segment of a C program.
int  pqr(BinaryNode t)

{ if (t == null )

return -1;

else

return 1+max(pqr(t.left),pqr(t.right))      }

Identify, what the above program intend(s) to do?

►Compute the height of a binary tree using an in-order traversal
►Compute the height of a binary tree using a pre-order traversal
►Compute the depth of a binary tree using a pre-order traversal
►Compute the depth of a binary tree using a post-order traversal

Question No: 15    ( Marks: 1 )    – Please choose one

Consider the following infix expression:

3 + 5 * 6 – 7 * (8 + 5)

Which of the following is a correct equivalent expression(s) for the above? ► 3   6 5 + * 7   5   8   +   – *

► 3   6 5 7   5   8 + *   +   – *
► 3    5   6 + * 7   8   5   +   – *

► 3    5   6   *   +   7   8   5   +   *    –

Question No: 16    ( Marks: 1 )    – Please choose one

An array is a group of consecutive related memory locations.

► True            Click here for detail

► False

Question No: 17    ( Marks: 1 )

 

 

 

Is this a correct statement? Give answer in Yes or No.

A node cannot be deleted, when the node to be deleted has both left and right subtrees.

False —-      No, it can be deleted.

Question No: 18    ( Marks: 1 )

Deleting a leaf node in binary search tree involves setting ______ pointer/s of that node’s parent as null.

1

2
3
4

VU CS301 -Data Structure MIDTERM Solved/Unsolved Papers Spring 2009

ALL NEW RESULTS
Educational News

Updated Educational News

Categories
POSTS BY DATE
December 2016
M T W T F S S
« Sep    
 1234
567891011
12131415161718
19202122232425
262728293031