NIELIT A Level July, 2015
A6-R4: DATA STRUCTURES THROUGH C++
PART ONE
(Answer all the questions)
1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)
A) A-B/C+D+E^F-G
B) AB-C/DE+FG-^+
C) ABC/-D+E^FG-+
D) None of the above
1.2 The most efficient search technique used in an ordered array is
A) Sequential search
B) Binary search
C) Interpolation search
D) None of the above
1.3 What does the following code segment do?
void fn( )
{
char c;
cin.get(c);
if (c != ‘\n’)
{
fn( );
cout.put(c);
}
}
A) The string entered is printed as it is.
B) The string entered is printed in reverse order.
C) It will go in an infinite loop.
D) It will print an empty line.