In which case default argument is used? Describe with an example. [5]
2.
Define namespace. List any two manipulators with their uses. [5]
Class and Objects
1.
Can we use object oriented concept using structure instead of classes? Justify your opinion. [5]
2.
What is the task of static data members and function? Illustrate with an example. [5]
3.
Why do we need friend class? How can we define member function outside the class? [5]
File and Streams
1.
Define stream. How do you read the text from file? Describe. [5]
Function Templates and Exception Handling
1.
What do we need template? Why the program terminate after the occurrence of exception? Describe the types of constructor. [4+6]
Inheritance
1.
Explain the chain of constructor and destructor between sub classes and super classes during inheritance with example. Create a class named 'Point' with data members x and y. Overload the + operator to add the value of two objects of this class. [5+5]
2.
Differentiate between aggregation and inheritance. Why do we need virtual base class? [5]
Introduction to Object Oriented Programming
1.
Explain the features of OOP. [5]
Virtual Function, Polymorphism, and other C++ Features
1.
Differentiate between abstract class and concrete class. Write a program to create a class named 'Quadratic' that represents a function of the form f(x) = ax + bx +C, where x is a real variable and a, b, c are real constants. The class must satisfy the following requirements: a. A constructor should be provided that takes the values of a, b and c as arguments. All three of these arguments should default to zero. b. A function that takes a single argument x return the value of f(x). c. All data members should be private. [2+8]
2.
Explain the use of pure virtual function with example. [5]