Beruflich Dokumente
Kultur Dokumente
of Pages: 02
Total No. of Questions: 07
INSTRUCTIONS TO CANDIDATES:
1. SECTION-A is COMPULSORY consisting of TEN questions carrying TWO marks each.
2. SECTION-B contains SIX questions carrying TEN marks each and students ha ve to
attempt any FOUR questions.
SECTION A
p e o
.r c
c) copy constructor
d) Virtual functions
p a
e) Friend functions
b r p e
f) Destructor
a
rp
g) Static member
h) Streams
i) References b
j) Polymorphism
M-12515 Page 1 of 2
SECTION B
2. a) Explain the role of constructor and destructor functions in a C++ class by considering a
suitable example and also tell a class can have maximum of how many constructor and
destructor functions.
b) What do you understand by the concept call by value and call by reference? Also
differentiate between them with example in C++.
3. a) What are the major principles of object oriented programming? Explain with suitable
examples.
b) Write a program in C++ to find factorial of a number. You are supposed to develop a
recursive function for finding factorial and show its use in main function.
4. Develop a class Matrix for integers in C++. Class must have all possible constructor and
destructor functions to create matrix object. Also overload ‘+’, ‘-‘, operators for matrix.
5. a) What are various kinds of loop statements supported by C++? Explain the functioning of
each one with suitable example.
of arguments.
o m
b) What is the role of friend function and friend class? Write suitable C++ code in support
6
.r c
a) Explain with example the working of storage class specifiers –Automatic variables,
Register variables, Static variables, External variables and global variables.
m
e o
b) What do you understand by inheritance? Explain each type of inheritance with the help of
example and diagram.
p
a .r c
7. Create a class student having various properties, Roll no., Name, Branch, Marks percentage.
p
And write a program using feature of C++ to read the information of all the students of a
r e
B.Sc.-I from the keyboard and store that information of in a data file.
b p
a
b rp
M-12515 Page 2 of 2