You are on page 1of 1

DEPARTMENT OF ELECTRICAL ENGINEERING

MBM University Jodhpur


nd
II Mid Semester Examination March 2022,
EE 202 A: COMPUTER PROGRAMMING IN C++ (E)
Time: One Hour Max. Marks: 20

1. Answer the following questions (in Brief): - (4*1.5=6 Marks)


a. When do we make class friend to another class?
b. When will you make a function inline?
c. State the use of scope resolution operator and its use in C++.
d. Define destructor.

2. Demonstrate Multiple inheritance with the help of program example


and explain the ambiguity in it. (4 Marks)

3. Define a class complex with real and imaginary as two data members
with default & parameterized constructors, function to initialize and
display data of class. It should multiply two complex objects. Write
a complete C++ program to demonstrate use of complex class. (4
marks)

4. Why do we need to use default arguments in function? Explain with


the help of C++ program. (4 Marks)

5. Distinguish between following two statements:


Time T2(T1);
Time T2= T1;
T1 and T2 are objects of Time class. (2 Marks)

You might also like