0% found this document useful (0 votes)
44 views4 pages

Null 1

This document contains instructions and questions for an exam on object-oriented programming and C++. It has 4 main questions with multiple sub-questions. Question 1 has multiple choice and short answer questions about C++ concepts like manipulators, operator overloading, classes, and constructors. Question 2 asks students to write short explanations for concepts like inline functions, differences between OOP and POP, and using constructors. Question 3 asks students to write longer explanations and examples for concepts like constructors, inheritance, friend functions, and operator overloading. Question 4 asks students to write even longer explanations and programs for concepts like virtual base classes, function overloading, basic to derived type conversion, and the significance of new/delete operators, de
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views4 pages

Null 1

This document contains instructions and questions for an exam on object-oriented programming and C++. It has 4 main questions with multiple sub-questions. Question 1 has multiple choice and short answer questions about C++ concepts like manipulators, operator overloading, classes, and constructors. Question 2 asks students to write short explanations for concepts like inline functions, differences between OOP and POP, and using constructors. Question 3 asks students to write longer explanations and examples for concepts like constructors, inheritance, friend functions, and operator overloading. Question 4 asks students to write even longer explanations and programs for concepts like virtual base classes, function overloading, basic to derived type conversion, and the significance of new/delete operators, de
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Total No. of Questions : 4] SEAT No.

:
PA1089 |Total No. of Pages :4
|5905|-41
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:
I) All questions are compulsory.
2) Figures to the right indicate full marks.
3) Draw neat diagram wherever necessary.

Q1) A) Choose the correct option |5x1=5]


a) is used to format the data display.
Interator Punctuator
iü) Manipulator iv) Allocator
b) Operator overloading is
Making operators work with objects.
Giving new meaning to existing operators
i) Making new operators.
iv) Giving operators more than they can handle.
c) An object is an instance of
Class State
Behaviour iv) Message
d) class supports opening file in write mode
ofstream ifstream
cstreanm iv) wstream

e) State whether following statements are true or false


1) Constructor should be declared in private section
2) Constructors are invoked automatically when the objects are
created.
i) True, True i) True, False
ü) False, True iv) False, False

PIO.
B) Answer the following. (5x1=5]
a) What is Abstract class?
b) List the different types of constructor.
c) Write the syntax to create a class.
d) List file opening modes.
e) Define Encapsulation.
02) Answer the following. (Any Five) |5x3=15]
a) What is Inline function? Write its syntax and advantages.
b) Write any 3 differences between OOP (Object Oriented Programming)
and POP (Procedure Oriented Programming)
c) Write a program to find area of rectangle using constructor.
What is static data member? List its characteristics.
e) What is Exception? Which Keywords are used? Write its general syntax.
f) Write a program to display factors of a number.

Q3) Answer the following (any five) |5x4=20]


a) Define constructor. Explain constructor overloading with example.
b) What is Inheritance? What ambiguity can arise in Multiple Inheritance?
How it is solved?
What is friend function? Explain its characteristics.
d) Enlist the rules of operator overloading.
e) Write a program to create a class student having roll no, name and
percentage. Write a member function to accept and display details of
students (use Array of objects)
f What is Manipulator? Explain syntax and use of any three.
What are the various file operations performed write a program to read
the contents from the text file.

04) Answer the following: (Any five) |5x5=25|


a) Explain virtual Base class concept with example.
b) What is function overloading? Write a program to overload function
volume to calculate volume of cube and cylinder.
c) Read the code and answer the questions.
classA

int
public:
void display ( )

cout <<x<< endl;

2
|5905]-41
class B: public A
int y;
public:
void display ()
cout <<y << endi;

main()

B b;
statement
statement 2

Which object oriented feature in illustrated.


i) Write statement I to execute member function display in class A.
i) Write statement 2 to execute member function display in class B.
iv) In which section are data members x and y declared.
d) Explain Basic to class type conversion with example.
e) Write the rules for virtual function.
f Write the significance ofthe following.
New operator
Delete operator
ii) Destructor
iv) Friend function
v) Insertion and extraction operator.
Find output and justify
# include< iostream.h>
class Test

private:
int x;
public:
void set (int x)
{ Test ::x= x;}
void print ()

cout << x="<<x<<endl;

:
[5905]-41 3
main ()

Test obj;
int x =40;
obj. set (x);
obj. print (0:

# include <iostream.h>
class Basel

public:
Basel ()

cout <<*Base 1 constructor is called";

class Base 2

public:
Base 2()
cout <<Base 2 constructor is called";

class Derived: public Base 1, public Base 2

public:
Derived()
cout <<Derived constructor called";

main(

Derived d;

4
[59051-41

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy