cirle, square and ectangle
4) Weite 2 C+ program to print the following pattern
A
BOC
DEF
Guid
©) Writea C++ programto accept length and width ofa rectangle. Calculate
and display perimeter of a rectangle by using inline function,
Q4) Auempt any Four ofthe following (out of Five) [4x4 = 16)
18) Trace output of following program and explain it. Assume there is no
syntax error,
# include
Class Number
(
Public: int a, bs
static intent;
Number ¢intx.inty)
{
cout <<"\n constructor called”;
(o144}-402 2
’
void display ()
{
cout <<" a =" <
inti,js
Clast sample
i
Public
‘Sample (int a= 0, int b = 0)
show (:
)
Void show ()
i
Cout <
imti,j:
Class sample
i
Public:
‘Sample (int a= 0, int b=0)23) Attempt any four ofthe following : (Out of) 44-16]
8) Writea C+ program to create aclass which contains two data members.
Write member functions to accept, display and swap two entered numbers
using eal by reference,
b) Write a C+ program to create a class customer which contains data
members asC_id,C_name,C_Salary. Write member functions toaceept
and display c nformation, also display information of customer
having maximum salary.
©) Write a C+ program to calculate factorial of integer number by using
inline function.
)__Design C++ class which contains function count() Write a program to
‘count number of time count is ealled. (Use staie data member)
©) Write a C+ program to copy the contents of a text file into another
textile
04) Attempt any four ofthe following, (Out of 5) [x4=16]
8) Explain object as Function arguments? Explain wth the help ofan example
rogram.
+b) Explain different characteristics of friend funtion,
©) Whats class Template? Explain syntax of class template with suitable
example.
4) Write a program to overload binary + operator to add two strings.
16034)-402 2
©) Trace the output of the following program and explain it. Assume there
is no syntax error.
# include
Class point {
Private
ity
Public:
Point (inti, int); constructor
dy
Point: Point (int
atj= 0)
‘cout << “constructor called”
intmain()
05) Write a short note on any two ofthe following : (Out of three) [2x3=6]
8) Thispoimter
') function overriding
©) Exception handling,“Total
-of Questions: 5] SEAT No.
P1913 Total Noval Page
16034)-402
S.Y.B.B.A. (Computer Application)
(CA- 402 : OBJECT ORIENTED CONCEPTS THROUGH CPP
(2019 Pattern) (Semester -1V)
Time : 21 Hons} Mex: Marks: 70
Insructions tothe candidates:
1) All questions are compulsory
2) Figures tothe right indicate fall marks.
Q1) Auemptany Eight ofthe following : (Out of 10) [8*2=16]
8) Explaintellg( and ellp() with syntax.
bb) Explainany two manipulators.
©) What is destructor?
4) What are the visibility lables used in C+.
©) What is extraction and insertion operator?
1) What is abstraction and Encapsulation?
1) Whatis default argument in funetion?
1h) Write any two uses of scope resolution operator,
|) What ie state Polymorphism,
Explain structure of C+ program,
PTO.
02) Auempt any four of the following: (Out of 5) [xa=16]
8) Explain operator overloading in C++ with an example.
'b) Explain memory allocation for objects with non-statie data member and
static data member,
2) Whatis pure vial function and explain with the help of example program,
4) Explain Dynamic constructor with suitable example.
©) Whats inheritance and explain the hierarchical inheritance.
93) Attempt any four of the following : (Out of 8) [4-16]
8) Writea C+ programto createa class which contains twodata members.
Write member funetions to accept, display and swap two entered numbers
using eall by reference.
b) Write a C+ program to create a class customer which contains data
‘members.as C_id, C_name, C_Salary. Write member functions to accept
and display eustomer information, also display information of customer
Taving recximtnsalery,