B.B.A (C.a) 2013 Pattern - Organized
B.B.A (C.a) 2013 Pattern - Organized
of Printed Pages—5
Seat
No. [5517]-401
B.C.A./B.B.A. (CA) (Sem. IV) EXAMINATION, 2019
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.
P.T.O.
2. Attempt any four of the following : [4×4=16]
(a) Explain array of object with diagram.
(b) What is tokens in C++ ? Explain in detail.
(c) Explain function overloading with example.
(d) Write a C++ program to read contents of a text file and
count number of characters, words and lines in a file.
(e) Write a C++ program using friend function to calculate sum
of digits of a number.
[5517]-401 3 P.T.O.
5. Attempt any four of the following : [4×4=16]
(a) Explain compile time polymorphism and runtime polymorphism
with example.
(b) What is stream ? Explain a stream class hierarchy.
(c) Create a class time which contains data members as hours,
minutes and seconds. Write a C++ program using operator
overloading for the following :
(i) = = to check whether two times same or not.
(ii) >> to accept time
(iii) << to display time.
(d) Write a C++ program to copy the content of one file to another
file.
(e) Trace the output of the following program and explain it. Assume
there is no syntax error :
#include <iostream.h>
using namespace std;
Class Base1
{
public:
Base1()
{
cout << ‘‘Base1’s constructor called’’ << endl;
}
};
Class Base2
{
[5517]-401 4
public:
Base2()
{
cout << ‘‘Base2’s constructor called’’ << endl;
}
};
Class Derived : public Base2, public Base1
{
public:
Derived()
{
cout << ‘‘Derived’s constructor called’’ <<endl;
}
};
int main()
{
Derived d;
return 0;
}
[5517]-401 5 P.T.O.