BCA-241:Object Oriented Programming and C++ S.Y. B.C.A. (Science)
BCA-241:Object Oriented Programming and C++ S.Y. B.C.A. (Science)
BCA-241:Object Oriented Programming and C++ S.Y. B.C.A. (Science)
a) syntax b) logical
c) runtime d) physical
v) When the object of derived class is created then the order of
constructor execution is
a base to derived b) derived to base
c) intermediate to base d) bottom to top
B) Answer the following,. (5 x 1=5]
List different types of polymorphism.
What is the purpose of scope resolution operator.
Enlist any two fill operations.
iv) Write syntax of reference variable.
v) List any two operator which should be overloaded as a member
function.
PT0.
92) Answer the following [Any Five] (5 x3= 15]
a) What is Manipulator? Enlist them with example.
b) Write advantage and Disadvantage of Inline function.
c) How to handle an exception in C++.
d) Explain difference of constructor and destructor.
e) Explain the usage of'this' pointer with example.
f) Read the code carefully and answer the question.
Class A
int a,b,
public :
A)
a= 0:
b= 0;
A(int x,int y)
a =;
b=y;
Void display ()
cout <<a<<b<<end 1.
:
main()
Aa;
statement 1:
statement 2:
[5826]-401 2
03) Answer the following (Any five) |5 x 4 = 20]
a) Write a C++ program to count number of vowels in a text file.
b) Write a program to find sum of numbers between I to n using constructor
where value of n will be passed to the constructor.
c) What is copy constructor? Explain with the help of example.
d) Explain function overloading with example.
e) What is class? Explain access specifiers use in it with example.
What is friend function? Explain with properties and example.
g) What is pure virtual function? Explain with suitable example.
int main()
[5826]-401 3
ii) # include <iostream>
using namespace std;
class p
Public:
void print ()
cout <<"Inside p:";}
class Q:public p
public :
Void print ( )
class R : public Q
Rr;
r. print ( ):
return 0;
O000
[5826|-401 4