2nd sem cs pqp
2nd sem cs pqp
PART-B
Note: Answer all the questions. (4 x 12= 48 Marks)
13. a) Define a call by value and call by Reference? Write a program to implement swappir
of two number by using call by value and call by reference?
(OR)
b) Write the following Concepts In detail?
() Inline Functien without class and Object?
(i).Write aList ofall the Object oriented Program Concepts?
4. a) Friend
Write aFunction?
Program to implement unary operator Overloading by using ' sign without
(OR)
b) Write a program TO implement the Addition of two numbers by using Friend
ciasses?
5. a) Define Inheritance? What are the different types of Inheritance, discuss each one
syntax and Example?
(OR)
Ab) Write a program to implement a Dynamic Polymorphism by using Pure Virtual Fun
Concept?
a Define a Template? Write a Program TO implement Swapping of Two numbers u
Function with Templates?
(OR)
b) Explain Exception handling Concept in detail with suitable Program?
Code No. 9041
FACULTY OF SCIENCE
B.Sc. I-Semester (CBCS) Examination, January/February 2021
PART - A
Answer any five questions. (5x4=20 Marks)
1 Describe different data types of C++ with
examples.
2 What is Default Arqument? Demonstrate with a C++ program?
3 Write down the applications of OOP.
4 What is the difference between a class and an instance of the class?
5 Briefly describe what is meant by member-wise assignment.
6 Explain Binary operator overloading in C++ using friend function.
7 What is the difference between redefining a base class function and overriding
a base class function.
8 Discuss formatted |/ O operations with advantages and disadvantages.
9 What is an abstract base class?
10 Explain how exception thrown by one function is caught by another function.
11 What is class template? Explain its syntax.
12 Can youoverload function templates? Explain.
PART -B
Answer any three questions. (3x20=6O Marks)
13 What do you mean by control flow statements? Explain each type with example.
18 Explain virtual function and run time polymorphism. Write a program to demonstrate
dynarmic polymorphism.
19 () Explain throwing and catching mechanism with suitable examples.
(üi) What should be placed inside the try block and catch block? When do you use
multiple catch handlers?
20 (i) What is function template? Explain the purpose of function templates with
suitable examples. templates.
(i) Write a program to implement a Bubble sort using function