Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1 (a) State the important features of object oriented programming. Compare object oriented programming with procedure oriented programming.
10 M
1 (b) Define function overloading. Write a C++ program to define three overloaded functions to swap two integers, swap two floats and swap two doubles.
10 M

2 (a) Differentiate between class and structure. With an example explain the syntax for defining a class.
10 M
2 (b) List the characteristics of a constructor. Write a C++ program to define a suitable parameterized constructor with default values for the class distance with data members feet and inches.
10 M

3 (a) Differentiate between function overloading and function templates, can we overload a fuction template? Illustrate with an example.
8 M
3 (b) Write a C++ program to create a class called STRING and Implement the following operations. Display the result after every operation by overloading the operator <<.
i) STRING S1= 'VTU'
ii) STRING S2 = 'BELGAUM'
iii) STRING S3 = S1+S2 (Use copy constructor).
8 M
3 (c) List the characteristics of a friend function.
4 M

4 (a) Explain the visibility of base class members for the access specifiers: private, protected and public while creating the derived class and also explain the syntax for creating derived class.
8 M
4 (b) Write a C++ program to illustrate multiple inheritance.
6 M
4 (c) List the types of inheritances. Write a C++ program to implement single inheritance with public access specific.
6 M

5 (a) With an example, explain the syntax for passing arguments to base class constructors in multiple inheritance.
10 M
5 (b) With an example, explain the order of invocation of constructors and destructors in multiple inheritance.
10 M

6 (a) Differentiate between early binding and late binding, with an example explain how late binding can be achieved in C++.
8 M
6 (b) With an example, explain how virtual functions are hierachical.
6 M
6 (c) Define pure virtual functions. Write a C++ program to illustrate pure virtual functions.
6 M

7 (a) Explain the output manipulators: setw(), setprecision() and setfill().
6 M
7 (b) Explain the use of ifstream and ofstream classes for file input and output.
8 M
7 (c) Explain the file operation functions in C++ to manipulate the position of file pointers in a random access file.
6 M

8 (a) Define exception handling. Explain the use of try, catch and throw for exception handling in C++.
8 M
8 (b) Write a C++ program to illustrate catching all exceptions.
6 M
8 (c) Explain briefly the three foundational items of standard template library.
6 M



More question papers from OOPS with C++
SPONSORED ADVERTISEMENTS