• Save
Cplus plus abd datastructure
Upcoming SlideShare
Loading in...5
×
 

Cplus plus abd datastructure

on

  • 480 views

this is practice set for CDAC CCEE, PG-DAC module C++ &Data Structures using C++

this is practice set for CDAC CCEE, PG-DAC module C++ &Data Structures using C++
CDAC PG courses examanation is starting from 8 Jan 2013

Statistics

Views

Total Views
480
Views on SlideShare
281
Embed Views
199

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 199

http://cdacguru.wordpress.com 199

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Cplus plus abd datastructure Cplus plus abd datastructure Document Transcript

  • 1 If the address of A[1,1] and A[2][1] are 1000 and 1010 respectively and each element occupies 2 byte of memory, then the array has been stored in A) row major order B) column major order C) matrix major order D) None of the above 2 One difference between a queue and a stack is: A) Queues require dynamic memory, but stacks do not. B) Stacks require dynamic memory, but queues do not. C) Queues use two ends of the structure; stacks use only one. D) Stacks use two ends of the structure, queues use only one 3 Number of nodes of left and right subtree of a binary tree of the given sequence 40, 30 42, 5, 7, 23, 9, 19 is: A) 2,5 B) 1,6 C) 6,1 D) None of the above 4 A) B) C) D) 5 A) B) C) D) 9 A) B) C) D) In a class if you don’t write any keyword, default access right is public private protected none of the above 7 A) B) C) D) A) B) C) D) The infix form of the following postfix expression is A B C + * D E / (A*B+C – (D/E)) (A*(B+C) – (D/E)) ((A*B)+C – (D/E)) None of the above 6 A) B) C) D) 8 If the characters 'A', 'B', 'C', 'D' are placed in a queue (in that order), and then removed one at a time, in what order will they be removed? BCDA ABDC DCBA ABCD Which one of the following is not correct? Base class object can be assigned to derived class object Derived class object can be assigned to base class reference Derived class object address can be assigned to base class pointer Derived class object can be assigned to base class object In which of the following hashing methods, we first divide keys into parts and then add them to get Hash value? Truncation Method Folding Method Mid Square Method Modular Method Which of the following operations is performed more efficiently by doubly linked list than by singly linked list? Deleting a node whose location is given Searching of an unsorted list for a given item Inverting a node after the node with given location Traversing a list to process each node
  • 10 A) B) C) D) 11 A) B) C) D) 12 A) B) C) D) An ADT is defined to be a mathematical model o f a user-defined type along with the collection of all ________ operations on that model. Cardinality Assignment Primitive Structured The expression + 3 * 2 * / - 3 5 4 2 equals: -1 5 1 0 Given the sequence of numbers: 13, 52, 95, 26, 38 The sequence after the 3rd iteration of insertion sort is: 13, 26, 52, 95, 38 13, 52, 95, 26, 38 13, 26, 38, 52, 95 13, 26, 52, 95, 38
  • 13 Given the following unbalanced tree: M N P O Q R The correct balanced alternative is: A) M O P R Q N B) N M P O Q R C) Q P R D) None of the above O N M
  • 14 Considering the following circular linked list: Head A) B) C) D) 15 A) B) C) D) 16 A) B) C) D) A B C The possible sequence of steps leading to the deletion of B: i) A -> next = B -> next; C -> prev = B -> prev; B = Null; ii) A -> next = A -> next -> next; C -> prev = C -> prev -> prev; B = Null; iii) A -> next = C -> prev; C -> prev = B-> prev; B = Null; Which of the following options highlights the correct alternatives? i), ii) ii), iii) i), ii), iii) i), iii) Following the heapify operation on the list: 4, 92, 65, 19, 52, 23, 75, the order (left to right) of the values in the leaves 19, 23, 4, 65, 75 4, 19, 52, 23, 65 4, 19, 23, 65 None of the above After the second iteration of the radix sor t, on the list: 107, 43, 90, 76, 34, 42, 84, 47, the order of the elements is 34, 42, 43, 47, 76, 84, 90, 107 90, 42, 43, 34, 84, 76, 107, 47 107, 34, 42, 43, 47, 76, 84, 90 None of the above 17 A) B) C) D) -*+ABC^-DE+FG is the prefix equivalent of A+B*C-D-E^F+G AB+C*DE-FG+^ABC*+D-E^FG+None of the above 18 A) B) C) D) Breadth First Search: Scans all incident edges, before moving on to the next vertex. Scans adjacent unvisited vertices, as soon as possible. Same as back tracking. None of the above 19 A) B) C) D) The necessary conditions for “queue full” and “ queue empty” respectively are: Full : FRONT = REAR = 0; Empty : FRONT = REAR – 1; Full : FRONT = 0; (REAR + 1) = n; Empty : FRONT = REAR; Full : FRONT = REAR + 1; Empty : FRONT = REAR – 1; None of the above 20 A) B) C) D) Given a hash table, the technique of partition ing the key into several parts and combining the parts in a convenient way (often using addition or multiplication) to obtain the index, is known as: Truncation. Folding. Hash – function. Scatter – storage.