Professional Documents
Culture Documents
CS214 - IVSemBTech - (CS) Second Home Assignment
CS214 - IVSemBTech - (CS) Second Home Assignment
CS214 - IVSemBTech - (CS) Second Home Assignment
TOTAL MARKS: - 10
Q1. Why is the size of an empty class not zero in C++? Justify your answer.
Q2. What is reference variable? Write a function using reference variable as argument to swap
the values of pair of integer.
Q3. What is a friend function? What are merit and demerits of using friend function?
Q4. Write a program in C++ to add and multiply two complex numbers using friend function.
Q5. What do you mean by polymorphism? How is late binding different from early binding?
Q6. What do you mean by a virtual function? Explain its use with a suitable example program?
Q8. Write a C++ program to pick the largest number from any 4 X 4 matrix.
Q10. How many arguments are required in the definition of an overloaded binary operator?
Q11. The annual examination is conducted for 50 students for three subjects. Write a program to
read the data and determine the following: