Mscit 103
Mscit 103
J-3094[S-94] [2037]
M.Sc. (IT) (Semester - 1st)
C++ & DATA STRUCTURES (M.Sc. (IT) - 103)
Time : 03 Hours Maximum Marks : 75
Instruction to Candidates:
1) Section-A is compulsory.
2) Attempt any Nine questions from Section-B
Section - A
(15 x 2 = 30)
Q1)
a) Differentiate between keyword and identifier?
b) Find the values of x >> 2 and x & y using the following declaration :
unsigned char x =’\011’, y =’\027’;
Q3) What are the different operators in C++. Differentiate between associativity
and hierarchy.
Q6) How will you sort names in reverse lexical order using arrays?
Q7) Define a class named complex for representing complex numbers. A complex
number has the general form a +ib, where a is real part and b the imaginary
part (i stands for imaginary). Complex arithmetic rules are as follows:
(a + ib) + (c + id) = (a + c) + i(b + d)
(a + ib) _ (c + id) = (a _ c) + i(b _ d)
(a + ib) * (c + id) = (ac _ bd) + i(bc + ad)
(
Define these functions as member functions of complex. i 2 = − 1 . )
Q8) How does C++ support Inheritance?
Q9) Write overloaded versions of function Min which compares two integers,
reals, or two strings, and returns the ‘smaller’ one.
Q11) Write a C++ program for the implementation of stack data structure.
Q12) Write a program that copies a user-specified binary file to another user-
specified file.
Q
J-3094[S-94] 2