0% found this document useful (0 votes)
25 views

Null 2

This document contains instructions for a C++ programming exam with 4 questions. It covers topics like object oriented programming principles, C++ features like classes, inheritance, polymorphism, operator overloading, and input/output streams. The questions test understanding of concepts through multiple choice, short answer, and writing code examples. Students are asked to write C++ programs that demonstrate using classes, inheritance, constructors, destructors, and virtual functions. They must also trace output for a sample program involving inheritance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Null 2

This document contains instructions for a C++ programming exam with 4 questions. It covers topics like object oriented programming principles, C++ features like classes, inheritance, polymorphism, operator overloading, and input/output streams. The questions test understanding of concepts through multiple choice, short answer, and writing code examples. Students are asked to write C++ programs that demonstrate using classes, inheritance, constructors, destructors, and virtual functions. They must also trace output for a sample program involving inheritance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Total No. of Questions : 4] SEAT No.

P-1357 [Total No. of Pages :4


[6058]-401
S.Y. B.C.A. (Science)
BCA 241 : OBJECT ORIENTED PROGRAMMING AND
C++
(2019 Pattern) (Semester - IV)
Time :3 Hours/ [Max. Marks : 70
Instructions to the candidates :
All questions are compulsory.
2) Figures to the right indicate full marks.
3) Draw neat diagram wherever necessary.

Q1) A) Choose the correct option [5 x 1=5]


Object Oriented Programming follows
a) Top-down approach b) Bottom-up approach
c) Top-up approach d) Left-Right approach
ii) Only one copy of data member is created for entire
class.
a) Static b) Public
c) Private d Inline
ii) Which is not the characteristics of constructor?
a) They should be declared in public section
b) They do not have return type
c) They cannot be inherited
d) They can be virtual
iv) The ambiguity in Single Level Inheritance is removed by using
a) Colon operator b) Scope Resolution operator
C) Comma d) New operator
V) Binary operators overloaded by means of member function requires
explicit arguments.
a) One b) Two
c) Three d) None

PT.0.
B) Answer the following : [5 x 1 = 5]
i) List the different access specifier.
ii) What is Encapsulation?
ii) List the types of Inheritance.
iv) What is the purpose of fstream class?
V) What is the purpose of Scope Resolution Operator?

02) Answer the following (Any Five): [5 x 3 = 15]


a) What is Inline function? Give its advantage and syntax.
b What is Exception? Explain with example.
c) Write any 3 difference between Procedure Oriented Programming and
Object Oriented Programming.
d) Write a C++ program to accept a number 'n', pass this number to the
constructor and find sum of numbers from 1 to n.
e) Explain usage of this pointer with example.
Read the following code and answer
Class A

int a, b;
public :
A)

a =0;
b= 0;

A (int x, int y)

a = x;
b= y:

void display()

cout << a <<b<K endl;

main ()

A a;
Statement 1
Statement 2

[6058|-401 2
How many number of Member function does the code contain.
Write statement 1 to call Parameterized constructor.
iii) Write statement 2 to call display function.

Q3) Answer the following (Any five) : [5 x 4 = 20]


a) What is friend function? Discuss its characteristics.
b) Explain in short :
i) Abstract class
ii) Virtual function
C) Write a C++ program to read a text file and count number of Upper
Case, Lower Case, Digits and Spaces.
d) Explain concept of Array of object with example.
e) What is constructor? Explain constructor overloading with example.
Write aC++ program to overload '+ operator to perform Addition of
two complex Numbers.
g) Explain Multilevel Inheritance with example.

04) Answer the following (Any five): [5 x 5= 25]


a) Explain private inheritance with example.
b) Which are the two ways of defining Member function? Explain any
one with example.
c) What is operator overloading? Write its syntax and also write the rules
of operator overloading.
d) Discuss conversion of Basic to Class Type with example.
e) Write a C++ program to create a class shape with function to find area
and display name of shape and other essential components of the class.
Create derived class circle, square, rectangle each having overridden
function area and display. Write a suitable program which illustrate
virtual function.
) Explain the following short :
i) Object
i) Class
ii) Reference variable
iv) Function overriding
v) New operator
|6058|-401 3
g) Trace the output and justify
i) # include (iostream. h)
int z;
main ()

int z = 50:
cout << "value of z is" <<::z;
cout << "value of zis" <<z:

# include (iostream. h)
Class A

public :
A ()
Cout <K "In class A":

cout << "In Destructor":

Class B : public A

public :
B()

cout <<"In class B'":

~B ()

cout << In class B Destructor";

int main(0

B b;
return 0;

[6058|-401 4

You might also like