Exam Details
Subject | oop with c++ | |
Paper | ||
Exam / Course | b.c.a | |
Department | ||
Organization | solapur university | |
Position | ||
Exam Date | March, 2018 | |
City, State | maharashtra, solapur |
Question Paper
B.C.A (Semester III) (CBCS) Examination Mar/Apr-2018
OOP WITH
Time: 2½ Hours
Max. Marks: 70
Instructions: All questions are compulsory. Figures to the right indicate full marks. .
Q.1
Choose the correct alternative.
14
stream extracts data from the file.
Input
Output
Both a and b
None of these
Execution of destructor depends on number of for class.
Constructors
Objects
Both a and b
None of these
Function overloading is possible if all
Function names are different
Function having same return type
Function having same name
Function having same signatures.
class cannot instantiated.
Friend
Abstract
Local
Global
data of class cannot accessed by non-member function.
Public
Private
Protected
Both b c
is a default parameter passing technique in
Pass by value
Pass by pointer
Pass by address
Both a b
cannot virtual.
Constructor
Destructor
Both a b
None of these
Ofstream class uses default file opening mode.
ios::in
ios::out
ios::ate
ios::app
A constructor can never return a value. Hence it has return type.
void
no
int
char
10) When a member function is defined inside the class, then it is treated as function.
virtual
friend
inline
outline
11) is base class for all stream classes in
ios
filebuf
fstream base
fstream
Page 2 of 2
SLR-SR-15
12) Compile time polymorphism is achieved by
Function overloading
Operating overloading
Virtual function
Both and
13) An object is variable, whose data types is
char
int
float
class
14) operator cannot overload using friend function.
Q.2
Answers to the following. [Any seven]
14
What is automatic type conversion?
Write any four basic rules for virtual function that satisfy the compiler requirement.
What are local classes?
Write syntax and use of keyword.
What is nesting of member function?
Write different rules to use constructor.
Write in short 'Delegation' as OOP's concept.
Write declaration syntax for an array of six pointers to double.
What is dynamic constructor?
Q.3
Attempt any two of the followings.
10
Write an object oriented program that checks entered number is Prime or not.
What is operator overloading? List out rules to overload unary binary operator?
Write a program that demonstrates the use of multiple constructors in a class.
How single friend function can act as bridge between two or more classes?
04
Q.4
Answer the following (Any
14
Write program that demonstrates use of 'virtual base class'.
What is Exception? How exception is handled in illustrate with one example?
Write a program in that checks two files are identical or not.
Q.5
Answer the following (Any
14
Write a program to overload operator using member function that concatenates two strings together.
Explain 'Hierarchical inheritance' with one example.
Write a program to implement class'electricity' that calculates electricity bill. Tha class contains following memeber functions-
Getdata(): To accept customer details along with previous and current units. Calculate(): To calculate total bill by considering unit consumed rate. Display(): To display entire bill of customer. Take appropriate data members of class and use following table to calculate bill-
Consumed Units
Rate per Unit in Rs.
0 to 49
2.0
50 to 199
3.5
200 to 499
4.5
500 above
5.0
OOP WITH
Time: 2½ Hours
Max. Marks: 70
Instructions: All questions are compulsory. Figures to the right indicate full marks. .
Q.1
Choose the correct alternative.
14
stream extracts data from the file.
Input
Output
Both a and b
None of these
Execution of destructor depends on number of for class.
Constructors
Objects
Both a and b
None of these
Function overloading is possible if all
Function names are different
Function having same return type
Function having same name
Function having same signatures.
class cannot instantiated.
Friend
Abstract
Local
Global
data of class cannot accessed by non-member function.
Public
Private
Protected
Both b c
is a default parameter passing technique in
Pass by value
Pass by pointer
Pass by address
Both a b
cannot virtual.
Constructor
Destructor
Both a b
None of these
Ofstream class uses default file opening mode.
ios::in
ios::out
ios::ate
ios::app
A constructor can never return a value. Hence it has return type.
void
no
int
char
10) When a member function is defined inside the class, then it is treated as function.
virtual
friend
inline
outline
11) is base class for all stream classes in
ios
filebuf
fstream base
fstream
Page 2 of 2
SLR-SR-15
12) Compile time polymorphism is achieved by
Function overloading
Operating overloading
Virtual function
Both and
13) An object is variable, whose data types is
char
int
float
class
14) operator cannot overload using friend function.
Q.2
Answers to the following. [Any seven]
14
What is automatic type conversion?
Write any four basic rules for virtual function that satisfy the compiler requirement.
What are local classes?
Write syntax and use of keyword.
What is nesting of member function?
Write different rules to use constructor.
Write in short 'Delegation' as OOP's concept.
Write declaration syntax for an array of six pointers to double.
What is dynamic constructor?
Q.3
Attempt any two of the followings.
10
Write an object oriented program that checks entered number is Prime or not.
What is operator overloading? List out rules to overload unary binary operator?
Write a program that demonstrates the use of multiple constructors in a class.
How single friend function can act as bridge between two or more classes?
04
Q.4
Answer the following (Any
14
Write program that demonstrates use of 'virtual base class'.
What is Exception? How exception is handled in illustrate with one example?
Write a program in that checks two files are identical or not.
Q.5
Answer the following (Any
14
Write a program to overload operator using member function that concatenates two strings together.
Explain 'Hierarchical inheritance' with one example.
Write a program to implement class'electricity' that calculates electricity bill. Tha class contains following memeber functions-
Getdata(): To accept customer details along with previous and current units. Calculate(): To calculate total bill by considering unit consumed rate. Display(): To display entire bill of customer. Take appropriate data members of class and use following table to calculate bill-
Consumed Units
Rate per Unit in Rs.
0 to 49
2.0
50 to 199
3.5
200 to 499
4.5
500 above
5.0
Other Question Papers
Subjects
- advance programming in c
- advanced java – i
- advanced java – ii
- advanced programming in ‘c’
- advanced web technology
- basics of ‘c’ programming
- business communication
- business statistics
- communication skills
- computer graphics
- computer oriented statistics
- core java
- cyber laws and security control
- data structure using ‘c’
- data structures using ‘c’
- data warehouse and data mining
- database management system
- dbms with oracle
- development of human skills
- digital electronics
- discrete mathematics
- e-commerce
- e-governance
- financial accounting with tally
- financial management
- fundamentals of computer
- fundamentals of financial accounting
- introduction to data mining & warehousing
- introduction to information technology
- linux and shell programming
- management information system
- networking & data communication
- networking and data communication
- object oriented programming with c++
- oop with c++
- operating system
- operations research
- operting system
- procedural programming through ‘c’
- python
- rdbms with oracle
- software engineering
- software project management
- software testing
- theory of computation
- visual programming
- web technology
- web technology – ii
- web technology – iii