1(a)
Explain any three features of object oriented programming.
6 M
1(b)
What is function overloading? Write a C++ program to define three overloaded functions to find the sum of two integers, sum of two floating point numbers and sum of three integers.
8 M
1(c)
What are inline functions? Illustrate inline functions with a example.
6 M
2(a)
Define class and objects. Write a c66 program to create a class STUDENT with the following specifications.
Data members: Name, Roll No. And Average Marks
Member functions: Read & Write
Use the above specification to read and print the information of 5 students.
Data members: Name, Roll No. And Average Marks
Member functions: Read & Write
Use the above specification to read and print the information of 5 students.
10 M
2(b)
What are constructors? Explain the different types of constructors. Write a c++ program to illustrate the different types of constructors.
10 M
3(a)
What are friend functions? Write a c++ program to find the sum of two complex numbers using friend functions.
10 M
3(b)
Write a c++ program to perform the addition of two location objects by overloading '+' operator, using a class 'LOCATION' with the data members longitude and latitude. Read and display the location objects by overloading the operators <<&>>.
10 M
4(a)
Explain the visibility of the class members for the access specifiers:
i) Public ii) Private iii) Protected.
Illustrate the same with a program.
i) Public ii) Private iii) Protected.
Illustrate the same with a program.
10 M
4(b)
Write a c++ program to illustrate multiple inheritance and multilevel inheritance.
10 M
5(a)
Illustrate with a C++ program the execution of constructors and destructors when single inheritance is involved.
6 M
5(b)
Explain passing of parameters to base class constructors in multiple inheritance.
8 M
5(c)
Explain the need for virtual base classes.
6 M
6(a)
What is a virtual function? Write a C++'s program to demonstrate calling of virtual function through a base class reference.
10 M
6(b)
With examples explain pure virtual function and abstract classes.
10 M
7(a)
What are steams in C++? Explain C++'s predefined streams?
8 M
7(b)
Explain width (), precision () and fill () functions.
6 M
7(c)
What are I/O manipulators? Explain any five C++ manipulators used for output.
6 M
8(a)
What is exception handling? Write a C++ program that illustrate exception handling with the help of keywords: try, throws and catch.
10 M
8(b)
What is STL? Briefly explain the use of containers, vectors, lists and Maps.
10 M
More question papers from Object Oriented Programming with C++