WWW Manaresults Co in
WWW Manaresults Co in
WWW Manaresults Co in
3. a) How members function is defined inside a class and outside the class? Explain with (7M)
an example each.
b) Define parameterized constructors. How to write them? Give an example. (7M)
6. a) a) Explain the use of try, catch and throw for exception handling in C++. (7M)
b) What are macros? How are they different from templates? Give an example. (7M)
7. What is a container? State and explain types of containers along with the iterators. (14M)
1 of 1
www.ManaResults.co.in
Code No: R161215 R16 SET - 2
I B. Tech II Semester Regular/Supplementary Examinations, April/May - 2018
OBJECT ORIENTED PROGRAMMING THROUGH C++
(Com. to CSE, IT)
Time: 3 hours Max. Marks: 70
Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answer ALL the question in Part-A
3. Answer any FOUR Questions from Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PART –A
1. a) Compare OOP language and structured programming language. (2M)
b) List the characteristics of a constructor. (2M)
c) What is an inline function? What is the use of it? (2M)
d) What is the use of scope resolution operator? (2M)
e) Differentiate run –time polymorphism with compile time polymorphism. (2M)
f) What is the use of this pointer? (2M)
g) Define ADT. (2M)
PART -B
2. a) Describe the demerits of conventional programming with suitable examples. (7M)
b) Give the principles of object oriented programming. (7M)
3. a) How to create a class? How to create an object? Explain with an example. (7M)
b) In which order the constructors and destructors are executed? Explain with an
example. (7M)
6. a) Explain the use of try, catch and throw for exception handling in C++. (7M)
Write a C++ program to illustrate runtime polymorphism using virtual functions.
(7M)
www.ManaR1eofs1
ults.co.in
Code No: R161215 R16 SET - 3
3. a) Write a C++ program to define three overloaded functions to swap two integers, (7M)
swap two floats and swap two doubles.
b) What are the access privileges in C++? What is the default access level? Explain (7M)
them.
4. a) Write a C++ program to implement single inheritance with public access specific. (7M)
b) Discuss the usage of the keyword ‘operator’ in operator overloading. Explain with
an example. (7M)
6. a) Write a C++ program to implement template to find minimum of two data items of (7M)
type int, float, char and double.
b) What is a function template? How is it different from a general method? Explain (7M)
with an example.
(7M)
wthmwsware.diMffearennt
b) How STL algori
4. With an example, explain the syntax for passing arguments to base class (14M)
constructors in multiple inheritance.
5. a) Write a C++ program to illustrate runtime polymorphism using virtual functions. (7M)
b) How to create a virtual destructor? What is the necessity of making it virtual? (7M)
6. a) Write a program using try block to detect and throw an exception if the condition” (7M)
divide-by-zero” occurs.
b) How can template be used for generic programming? (7M)
7. What is a container? Give the comparison of various containers used in STL (14M)
programming.
www.ManaR1eofs1
ults.co.in