Short Questions
1(a)
Why C++ is not a pure object oriented programming language?
1 M
1(b)
Explain encapsulation property of an OOP language.
1 M
1(c)
Define class in C++.
1 M
1(d)
What is the use of namespace in C++?
1 M
1(e)
What are stream extraction and stream insertion operators?
1 M
1(f)
Define destructor.
1 M
1(g)
What is a friend class?
1 M
1(h)
What is an abstract class?
1 M
1(i)
What is the use of private inheritance?
1 M
1(j)
Briefly explain multi-level inheritance.
1 M
1(k)
Explain pure virtual function.
1 M
1(l)
Discuss various access specifiers in C++.
1 M
1(m)
What is the use of overloading an assignment (=) operator?
1 M
1(n)
Explain tellg( ) function in file streams.
1 M
2(a)
Explain function overloading with a program.
3 M
2(b)
Create two classes X and Y containing private variables x and y respectively. Using a common friend function, perform multiplication operation between x and y.
4 M
Solve any one question from Q.2(c) & Q.2(d)
2(c)
Create a class coordinate containing x, y and z private variables. Perform operations for incrementing, adding and comparing object(s) by overloading + +, + = and = = operators respectively. Define necessary functions to set and display the variables.
7 M
2(d)
Write a program to demonstrate conversion of an object of one
class into an object of another class.
7 M
Solve any three question from Q.3(a), Q.3(b), Q.3(c) & Q.3(d), Q.3(e), Q.3(f)
3(a)
Explain call by reference with a program.
3 M
3(b)
Explain this pointer with a program.
4 M
3(c)
Write a program to create a class distance containing feet and
inches. Using operator keyword, convert an object of class
distance into total meters which is a float data type. (1 meter=3.28
Feet)
7 M
3(d)
Discuss new and delete keywords.
3 M
3(e)
Discuss nameless temporary object.
4 M
3(f)
Demonstrate the use of static variables and static functions with a program.
7 M
Solve any three question from Q.4(a), Q.4(b), Q.4(c) & Q.4(d), Q.4(e), Q.4(f)
4(a)
Explain Scope Resolution Operator (::) with a program.
3 M
4(b)
Explain virtual base class with a program.
4 M
4(c)
Write a program which uses command line argument to copy the contents of a file A.txt into another file B.txt by reversing case of the characters. E.g. File A.txt: aBCd File B.txt: AbcD
7 M
4(d)
Discuss the use of inline functions.
3 M
4(e)
Demonstrate the use of virtual functions with a program.
4 M
4(f)
Explain the use of binary files in C++ with a program.
7 M
Solve any three question from Q.5(a), Q.5(b), Q.5(c) & Q.5(d), Q.5(e), Q.5(f)
5(a)
Explain ios::app and ios::ate flags.
3 M
5(b)
Explain the use of multiple handlers in exception handling with a program.
4 M
5(c)
Create a generic class stack using template and implement
common Push and Pop operations for different data types.
7 M
5(d)
Explain ios::binary and ios::trunc flags.
3 M
5(e)
Discuss Standard Template Library.
4 M
5(f)
With a program, explain exception handling in C++.
7 M
More question papers from Object Oriented Programming with C++