C++ QB Ia-1 (2023-24)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

H.K.E.

Society’s
Sir M. Visvesvaraya College of Engineering
Department of Computer Science & Engineering
(Affiliated to VTU - Belagavi, Approved by AICTE – New Delhi, Accredited by NAAC)
Yeramarus camp, Raichur – 584135

Subject: Object Oriented Programming using C++ Subject Code: BCS306B

Question Bank IA-1 (2023-24)


Qn. Max CO RBT
Question
No. Marks Mapped Level
1 Explain the terms encapsulation, polymorphism and
05 CO-1 L1, L2
inheritance in object oriented programming.
2 With an example explain the concept of inline functions. 05 CO-1 L1, L2
3 What is function overloading? Write a C++ program to
define three overloaded functions area(), to find area of 05 CO-2 L1, L2, L3
rectangle area of rectangular box and area of circle.

4 What is function overloading? Explain with examples. 05 CO-1 L1, L2


5 Define class? Give its syntax. Explain the various ways of
CO-1 L1, L2
defining member functions.
6 What are constructors? How is a constructor different from
member function? Illustrate with example. 05 CO-1 L1, L2

7 Write a C++ program to add 2 complex number using 05 CO-2 L3


parameterized constructor method.
What is a friend function? Explain the need of friend
8 functions in C++. 05 CO-2 L1, L2

With the aid of example program explain how friends


9 bridge the gap. 05 CO-2 L3

What is the need of static members? Illustrate with


10 example program. 05 CO-2 L1, L2

Write a C++ Program to count the number of objects


11 in a program. 05 CO-2 L3

12 Explain the various ways of using scope resolution 05 CO-2 L1, L2


operator with example program.
Write a C++ program to add 2 complex number using
13 passing objects as arguments and returning object 05 CO-2 L3
concept.
What is a class? How it is created? Write a C++ programme
14 to create a class called employee with data members : 05 CO-2 L3
name, age and salary. Display at least ‘5’ employee
information.
H.K.E. Society’s
Sir M. Visvesvaraya College of Engineering
Department of Computer Science & Engineering
(Affiliated to VTU - Belagavi, Approved by AICTE – New Delhi, Accredited by NAAC)
Yeramarus camp, Raichur – 584135

Subject: Object Oriented Programming using C++ Subject Code: BCS306B

Question Bank IA-1 (2023-24)

15 With the help of program, explain how constructors 05 CO-1 L1, L2


and destructors are invoked in C++.
16 Explain the following with example: 05 CO-1 L1, L2
a) this pointer b) pointer to objects.
17 With the help of program, explain the concept of copy 05 CO-1 L1, L2
constructors in C++.
18 What is the need of default arguments, explain with 05 CO-1 L1, L2
an example program.

Note:

CO 1: Illustrate the basic concepts of object-oriented programming.


CO 2: Design appropriate classes for the given real world scenario.

You might also like