Total No. of Questions—5] [Total No.
of Printed Pages—5
Seat
No. [5417]-401
B.B.A. (C.A.)/B.C.A. (IV Semester) EXAMINATION, 2018
(401) OBJECT ORIENTED PROGRAMMING USING C++
(2013 PATTERN)
Time : Three Hours Maximum Marks : 80
N.B. :— (i) All questions are compulsory.
(ii) Figures to the right indicate full marks.
(iii) All questions carry equal marks.
(iv) Neat diagrams must be drawn wherever necessary.
(v) Assume suitable data if necessary.
1. Attempt any eight of the following : [8×2=16]
(a) What is encapsulation ?
(b) What is void pointer ?
(c) Define the following terms :
(i) Identifier
(ii) Constant.
(d) What is function prototype ?
(e) Define destructor.
(f) What is polymorphism ?
(g) What is virtual function ?
(h) Write uses of get( ) and put( ).
(i) Define the following :
(1) tellg( )
(2) tellp( )
P.T.O.
(j) Define :
(1) class template
(2) function template.
2. Attempt any four of the following : [4×4=16]
(a) Differentiate between object oriented programming and procedure
oriented programming.
(b) Write a note on memory management operators in C++.
(c) What is inheritance ? Explain its three types.
(d) Write a C++ program to find maximum and minimum of two
integers and two float numbers by using function template.
(e) Write a program to append contents of one file to another
file.
3. Attempt any four of the following : [4×4=16]
(a) Write a note on exception handling.
(b) What is inline function ? Write difference between macro and
inline function.
(c) Write a program to overload unary operator ! (NOT).
(d) Write a C++ program to find reverse of a number using friend
function.
(e) Write a program which will implement the concept of virtual
base class.
[5417]-401 2
4. Attempt any four of the following : [4×4=16]
(a) Explain rules for overloading operators.
(b) Explain parametrized constructor with a suitable example.
(c) Explain functions for error handing during file operation.
(d) Write a program to calculate area and circumference of a circle
using inline function.
(e) Trace the output of the following program and explain it. Assume
there is no syntax error :
#include <iostream.h>
class Base1 {
public :
~ Base1 ( )
cout << ‘‘Base1’s destructor’’ << endl;
}
};
class Base2 {
public :
~ Base2 ( )
cout << ‘‘Base 2’s destructor’’ << endl;
};
class Derived : public Base1, Public Base2
[5417]-401 3 P.T.O.
{
public :
~ Derived ( )
cout << ‘‘Derived’s destructor’’ << endl;
}
};
int main ( )
Derived d;
return 0;
5. Attempt any four of the following : [4×4=16]
(a) What is static data member ? Explain its characteristics.
(b) Explain scope resolution operator with an example.
(c) What is implicit and explicit type conversion ?
(d) Write a program which accepts n no. of student details like
rollno, name, address, percentage. Write a function which sort
students according to percentage. Display students data before
and after sorting.
(e) Trace the output of the following program and explain it. Assume
there is no syntax errors.
void position (int & C1, int C2 = 3)
[5417]-401 4
{
c1+ = 2;
c2+ = 1;
int main ( )
{
int P1 = 20, P2 = 4;
Position (P1);
Cout << P1 << ‘‘,’’ << P2 << endl;
Position (P2, P1);
Cout << P1 << ‘‘,’’ << P2 << endl;
[5417]-401 5 P.T.O.