C++ Previous Question Papers
C++ Previous Question Papers
|'''|'|'|''||'''||||
Code No: R2021051 R20 SET - 1
UNIT-I
1 a) Compare structured programming and object oriented programming paradigm. [7M]
b) What are the key concepts are of object oriented programming. Explain in detail. [7M]
OR
2 a) What is the need of data types in C++? Describe different data types along with [7M]
their representations and size in C++.
b) Explain the advantages of object oriented programming. [7M]
UNIT-II
3 a) What are objects and how they are created from class? Explain with a C++ [7M]
program.
b) In which order the constructors and destructors are executed? Explain with an [7M]
example.
OR
4 a) What are the different ways to define member functions of a class? What is the [7M]
role of scope resolution operator in the definition of member function?
b) Why do we need Nested classes in C++ programming? Write a C++ program to [7M]
demonstrate the necessity of nested classes.
UNIT-III
5 a) Write a C++ program to illustrate the importance of overloading Binary operator [7M]
‘+’ for adding two complex numbers.
b) Why do we use virtual base class in C++? Give explanation with an example. [7M]
OR
6 a) Give the rules for operator overloading. Discuss an example. [7M]
b) What is the significance of inheritance? Explain various types of inheritance [7M]
with suitable example.
1 of 2
|'''|'|'|''|''||'|||
Code No: R2021051 R20 SET - 1
UNIT-IV
7 a) Define Pointer. How to declare, initialize and access pointers in C++? Explain. [7M]
b) What is Function template? Can a class member function template be virtual? [7M]
Explain
OR
8 a) How do you declare a pointer to an object in C++? Explain with an example [7M]
program.
b) Explain the purpose of Virtual destructors in C++ with a sample program. [7M]
UNIT-V
9 a) Explain in detail about the four important components of C++ Standard [7M]
Template Library.
b) Write a C++ program to insert elements into a list. [7M]
OR
10 a) How are templates different from macros? Explain. [7M]
b) How many associative containers are provided by C++? Explain. [7M]
2 of 2
|'''|'|'|''|''||'|||
Code No: R2021051 R20 SET - 1
3 a) What is the difference be inline member function and volatile member function? [7M]
Give examples.
b) Write a C++ program to overload area () function to calculate area of shapes like [7M]
triangle, square, circle.
Or
4 a) What are the methods used to pass an argument to a function? Explain with [7M]
Examples.
b) Write a C++ program to declare object and display their contents. [7M]
1 of 1
|''|''|||''|'''|||'|