No.
of Printed Pages : 4 BCS-031
BACHELOR OF COMPUTER
APPLICATIONS (BCA) (REVISED)
Term-End Examination
December, 2022
BCS-031 : PROGRAMMING IN C++
Time : 3 Hours Maximum Marks : 100
Weightage : 75%
Note : Question number 1 is compulsory and carries
40 marks. Attempt any three questions from
the rest.
1. (a) What is Encapsulation ? Are encapsulation
and information hiding the same ? Explain.
(b) What is an Exception ? How is it handled
in C++ ? Explain with the help of an
example. 5
P. T. O.
[2] BCS-031
(c) What are containers ? Explain the use of
list container class with the help of an
example. 5
(d) Differentiate between copy constructor and
default constructor in C++, with the help of
an example for each. 5
(e) “Abstract class provides a base, upon
which other classes may be built.” Justify
the statement, with the help of an
example. 5
(f) What is a member function ? Briefly
discuss the purpose of member function in
C++, with suitable example. 5
(g) What is ‘this’ pointer ? Explain the
significance of ‘this’ pointer with the help
of an example program. 5
(h) What are static data members of a class ?
Explain the characteristics of static data
members. 5
2. (a) What is function overloading ? Explain
how it is implemented in C++ with the help
of a program. 10
[3] BCS-031
(b) What is a class template ? Give two
advantages of class template. Create a
class template for a linked list data
structure. 10
3. (a) What is operator overloading ? Write a C++
program to overload ‘+’ operator to find the
sum of two complex numbers. Support your
program with suitable comments. 10
(b) What is a friend function ? How does it
differ from the member function ? Explain
the implementation of friend function in
C++, with the help of an example program.
10
4. (a) What is inheritance ? Briefly discuss the
different types of inheritance, supported by
C++. Explain how inheritance is
implemented in C++. 10
(b) What is the difference between call by
value and call by reference in a user
defined function in C++ ? Give an example
to illustrate the difference. 10
P. T. O.
[4] BCS-031
5. Write short notes on the following with example
for each : 4 each
(i) Pure virtual functions
(ii) Message passing
(iii) Inline function
(iv) Destructors and their need
(v) Relational operators in C++
BCS–031