0% found this document useful (0 votes)
133 views2 pages

Ipjugaad - B Tech 3rd Sem Object Oriented Programming Using C++ Paper 2023

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

(Pleaae write your Exam Roll No.} Exam Roll No. D.i1..~.?..!.

~1':fv1
END TERM EXAMINATION
THIRD SEMESTER •TEcH ll'EBRUARY 2023
Paper Code: CIC-211 Subject: Object Oriented Programming
Using C++
Time: 3 Hours Maximum Marks: 75
Note: Attempt flve questions in all including Q. No.1 which is ..
compulsory. Select one question from each unit.

[01 fai)
Answer all the following questions briefly:-
List the features of object oriented programming. (3)
Jb) Differentiate between a Constructor and Destructor in context of class @
.

_,,{c) What are various access specifiers in C++? How is protected specifier
useful? (3)
.,.,{d) What is generic programming? What are its advantages? (3)
,,_1e) How does · a compile time polymorphism differ from run time
polymorphism? (3)

UNIT-I
;(a) Explain the meaning and syntax of an inline function. Write, an inline
Q2
function in C++. Further, write two situations when an inline function
expansion may not work. (8)
/(b) What is the difference between call by value and call by reference for a
function? Explain with the help of C++ code. (7)

Q3 (a) Write any three features of friend function and explain its
functionality ,using suitable example. Why friend functions should be
avoided? l . (7)
(b) How does C++ support data abstraction and Encapsulation? A,ppraise
with an appropriate example why is it necessary to create good
abstraction? (4)
(c) Explain the default parameter value in C++ with an example. (4)

UNIT-D
(a) What do you mean by an array ·or objects? Explain how members of~
/ objects can be accessed in array of objects with the help of C++ l...:J:J
program. (7)
_;ll'{b) Explain parameterized -constructor and copy constructor with an /6!7
example. (4) L1/
(c) Explain the state, identity and behaviour of an object in C++. (4)

Q5 (a) Explain the concept of operator overloading. Write a code in C++ to


add two complex numbers. (7)
(b) What is data hiding? What are the different ·mechanisms for
protecting data from the external users of a class's objects? (4)
(c) Explain dynamic memory allocation in C++. (4)

P.T.O.
[-2-)

UNIT-m
JJ6 (a) Difference between overloaded functions and overridden functions. G
What is ambiguity . resolution in class inheritance? When do you
encounter such a situation· and how it is handled? Explain with an
example. (8)
(b) What do you mean by a template member function? Write a program
/ to define the function template for calculating the square of given 6
numbers with different data types. (7)

Q7 (a) Consider an example of declaring the examination result. Design three


classes: student, exam and result. The student class has data
members such as those representing roll number, names etc. Create
the class exam by inheriting the student class. The exam class adds
data members representing the marks scored in six subjects. Derive
the Result from Exam class and it has its own data members such as
total_ marks. Write ·an interactive program to model this relationship. (8)
(b) What are pure virtual functions? How do they differ from normal
virtual functions? (7)

UNIT-IV
Q8 (a) Describe the various components of STL in detail. (8)
(b) Write a C++ program to read the class object of student info such as
name, age, gender, height and weight from the keyboard and to store
them on a specified file using read() and write() functions. Again the
same file is opened for reading and displaying the contents of ·the file
on the screen. (7)

Write short notes on the following:-


,.r(a) Exception handling in C++ (5) @'
,l"{b) Generic Classes (5) (9
• (c) Vectors (5) (y

***********

You might also like