Roll No. …………………..
BCA–401
B. C. A. (Fourth Semester)
EXAMINATION, 2016
OBJECT ORIENTED PROGRAMMING USING C ++
Time : Three Hours
Maximum Marks : 70
Note : Attempt all questions.
Section—A
1
1. Attempt any four questions : 32 each
(a) Standard template library
(b) C++ program to copy contents of one file to
another file.
(c) I/O stream class hierarchy
(d) Destructor implementation
(e) Data abstraction and Abstract class
(f) Scope resolution operator.
Section—B
2. Attempt any two of the following : 7 each
(a) How C++ differs with C ? Describe main
characteristics of OOP’s with example.
[2] BCA–602
(b) What is dynamic memory management ? How is
it handled in C ++ ? Give example.
(c) Write a C++ program to convert temperature in
Fahrenheit to Celsius.
3. Attempt any two of the following : 7 each
(a) Illustrate through suitable example, the difference
between function declaration, function definition
and function call.
(b) Write class “Rectangle” containing two data
“length” and “breath” and four function (i) set
........ data(), (ii) get data (), (iii) display data ()
and (iv) area (). To set the length and breath; to
get the user input; to display and to find the area
of the rectangle respectively. Also write a
program which declares the objects and use the
member ?
(c) What is inheritance ? Explain different types of
inheritance with suitable example diagram and
syntax.
4. Attempt any two of the following : 7 each
(a) What are the different types of constructor ?
Explain with suitable example.
(b) What are templets ? Write C++ program to find
the greater of two numbers using class template.
(c) What is polymorphism ? How virtual function
can be used in run time polymorphism ? Explain
with example.
[3] BCA–602
5. Attempt any two of the following : 7 each
(a) Define the meaning of operator overloading. Why
is it necessary ? Also write a C ++ program to
overload “+” operator for concatenation of two
strings.
(b) How is exception handled in C ++ ? Write
program to demonstrate the concepts of
rethrowing an exception.
(c) What is the need of data file ? Create a data file
which contains a list of mobile numbers in the
following form :
Ram : 9412340891
Mohan : 9678927070
Suresh : 9788914708
BCA—401 70
A-6 P. T. O.