0% found this document useful (0 votes)
9 views

Object Oriented Programming Using C++

This document contains questions for an exam on object oriented programming using C++. It includes multiple choice, short answer and long answer questions testing concepts like encapsulation, inheritance, polymorphism and exception handling.

Uploaded by

sotaropubg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Object Oriented Programming Using C++

This document contains questions for an exam on object oriented programming using C++. It includes multiple choice, short answer and long answer questions testing concepts like encapsulation, inheritance, polymorphism and exception handling.

Uploaded by

sotaropubg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Roll No. …………………..

BCA–C202
B. C. A. (Second Semester)
EXAMINATION, 2022-23
OBJECT ORIENTED PROGRAMMING USING C++
1
Time : 22 Hours

Maximum Marks : 60

Note : All questions have to be attempted.

Section—A

1. Multiple choice questions : 1 each

(a) Select the valid library file for standard input and
output in C++. (CO1, BL1)

(i) #include <io.h>

(ii) #include <stdio.h>

(iii) #include <iostream.h>

(iv) #include <inputoutuput.h>

P. T. O.
[2] BCA–C202

(b) One of the basic concepts in Object Oriented


Programming approach is bundling both data and
functions into one unit known as : (CO1, BL2)
(i) Encapsulation
(ii) Variable
(iii) Inheritance
(iv) Exception
(c) A function declared within a class is called as a :
(CO2, BL2)
(i) Class function
(ii) Member function
(iii) Inline function
(iv) Object function
(d) Two different data type variables can be
compared by applying : (CO3, BL2)
(i) Typcasting
(ii) Equating
(iii) Operator overloading
(iv) Operator comparison
(e) Class members are : (CO2, BL2)
(i) Public by default
(ii) Private by default
(iii) Protected by default
(iv) Inherited by default
[3] BCA–C202

(f) ................... is used to declare and initialize an


object from another object. (CO3, BL3)
(i) Constructor
(ii) Destructor
(iii) Inheritance
(iv) Copy constructor
(g) ................... variables are normally used to
maintain values common to the entire class.
(CO3, BL2)
(i) Static
(ii) Dynamic
(iii) Public
(iv) Private
(h) A class inherit properties from more than one
class which is known as : (CO4, BL3)
(i) Single inheritance
(ii) Multiple inheritance
(iii) Diamond inheritance
(iv) Inheritance
(i) Which of the following functions can directly
access the private and protected data ?
(CO4, BL3)
(i) Friend functions and the member functions
of a friend class.
(ii) Member functions of the class only
(iii) Friend functions
(iv) Functions of the derived class

P. T. O.
[4] BCA–C202

(j) Function overloading is a kind of : (CO4, BL4)


(i) Inheritance
(ii) Early binding
(iii) Late binding
(iv) Friend function
(k) #include <lostream> (CO5, BL5)
int main() {
int a,b;
a=5+3*5;
b=++a;
std : : cout<<b;
return 0;
return 0;
}
(i) 21
(ii) Error
(iii) 20
(iv) 19
(l) Which of the following is best to apply when we
know the number of iterations ? (CO2, BL5)
(i) while loop
(ii) do while loop
(iii) for loop
(iv) if loop
[5] BCA–C202

2. Attempt any four of the following (short answer type


questions) : 3 each
(a) Illustrate object-oriented programming. How is it
different from the procedure-oriented
programming ? (CO1, BL4)
(b) When will you make a function inline ? Why ?
(CO2, BL5)
(c) Differentiate constructors and destructors.
(CO2, BL2)
(d) Explain an abstract class and its uses. (CO3, BL1)
(e) Describe the advantages of exception handling.
(CO4, BL2)
Section–B

3. Attempt any two of the following : 6 each


(a) Develop a program to demonstrate the concept of
friend function. (CO2, BL5)
(b) Explain the advantages of constructors and list
the different types of constructors. (CO2, BL3)
(c) Develop a program using array of objects for
accepting and displaying the multiple datasets of
student class; student class should have the data
members as Std_Id and Std_name. (CO2, BL5)

P. T. O.
[6] BCA–C202

4. Attempt any two of the following : 6 each


(a) Design three classes named student, test, and
results, where results class inherits from test class
and test class inherits from student class. Assume
the necessary data members and member
functions for the program. (CO3, BL5)
(b) Explain the concept of function overloading
through an example program (CO3, BL4)
(c) Explain multiple and multi-level inheritance
concepts. (CO3, BL4)

5. Attempt any two of the following : 6 each


(a) How does polymorphism promote extensibility ?
Explain the various types of polymorphism with a
program ? (CO4, BL4)
(b) Define the terms virtual base class and its
implementation in C++. How is it used in
function overriding ? (CO4, BL4)
(c) Discuss the advantages of object-oriented
programming. Write a program to check input
number is prime or not. (CO2, BL6)

BCA–C202

You might also like