What is function overloading? Explain with an example.[5]
Class and Objects
1.
Why data conversion is needed?How Conversion between objects of different classes is carried out.Write a program containing classes Kilogram and Gram to convert Gram to Kilogram. (1 Kilogram = 1000 grams)[2+4+4]
2.
What is constructor?Write a program to demonstrate constructor overloading in C++.[1+4]
3.
What is friend function?Write a program to add any two private numbers of two different classes using friend function.[1+4]
File and Streams
1.
Write a program that writes objects to a binary file and reads objects from the same file.[5]
Function Templates and Exception Handling
1.
Illustrate Exception handling in C++ using try, throw and catch statements.[5]
2.
What is function template?Write a program to demonstrate the use of function template that returns the greatest among integers, and float passed to it.[1+4]
Inheritance
1.
Differentiate between single level inheritance and multiple inheritance?Write a C++ program to calculate the percentage of a student using multi-level inheritance. Accept the marks of three subjects in base class "Capture". Derive class "Total" from "capture" which should include a function to find the total marks obtained and derive class "Final" from "Total" which should calculate and display the percentage of student.[3+7]
2.
What is the role of protected access specifiers in inheritance? Explain with example.[5]
Introduction to Object Oriented Programming
1.
Why object oriented programming is known as bottom up approach?Explain different features of object oriented programming.[3+7]
Operator Overloading
1.
What is operator overloading? Explain with an example.[5]
Virtual Function, Polymorphism, and other C++ Features
1.
Differentiate between virtual function and pure virtual function with an example.[5]