0% found this document useful (0 votes)
60 views1 page

C (2nd) May2017

The document discusses object oriented programming concepts in C++ including classes, objects, inheritance, polymorphism, exceptions, and file handling. It provides example questions on these topics and asks students to write programs demonstrating various OOP concepts.

Uploaded by

xilice9481
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)
60 views1 page

C (2nd) May2017

The document discusses object oriented programming concepts in C++ including classes, objects, inheritance, polymorphism, exceptions, and file handling. It provides example questions on these topics and asks students to write programs demonstrating various OOP concepts.

Uploaded by

xilice9481
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/ 1

Bachelor of Computer Applications 2nd Semester

Object Oriented Programming Using C++


Time : Three Hours] [Maximum Marks : 65
Note. Attempt one question from each section and the compulsory question
SECTION-A
1. (a) Explain various concepts of OOP in detail with relevant code example.
(b) Write note on memory management operators. Support your answer with relevant CH
code.
2. (a) How object oriented programming is different from procedure oriented programming
approach?
(b) Write a program using Ch to read the details of a book (title, author price) and display
the details on execution. Use class and objects in program.
SECTION-B
3. (a) What do you mean by a friend function? Explain the rules for a friend function.
Support your answer with a relevant example.
(b) What do you mean by operator overloading? Write a program in C+ to overload the
plus (+) operator to find sum of two distance values given in Km. and mtrs.
4. (a) What are the different methods by which objects can be passed as arguments to a
function. Explain your answer with relevant example.

C+.
o m
(b) What do you mean by a constructor? Explain different types of constructors used in

.r c SECTION-C
5. (a) What do you mean by inheritance? Why is this concept required? Explain the kind of

p e
ambiguities which may generate during inheritance and how can these be handled.

m
(b) What do you mean by virtual functions? Write a program in Ch to show use of virtual
functions.
a o
p .r c
6. (a) Explain different types of inheritance available in Ch. Describe every type of

r
inheritance with related syntax.

b e
(b) What do you mean by polymorphism ? Explain with an example, how polymorphism
can be implemented by using pointers.
p
p a
SECTION-D
7. (a) What do you mean by exceptions? Discuss the basics of exception handling

b r
mechanism and the advantages/disadvantages of exception handling.
(b) What are the steps involved in using a file in a C++ program? Discuss various classes
available for fill operations and different methods of opening a file.
8. Write notes on the following:
(i) Catching mechanism in exception handing
(ii) Random file processing and related functions
(iii) Binary file operations
SECTION-E
(Compulsory Question)
9. Attempt all parts:
(i) What do you mean by type cast in Ch?
(ii) Differentiate the private and public members of a class.
(iii) What is function overloading? Explain in brief.
(iv) Which operators cannot be overloaded in C++?
(v) What is difference between early and late binding?
(vi) How can you rethrow an exeption? Explain in brief.

You might also like