Вы находитесь на странице: 1из 3

9036

0708-I
3 Hours / 80 Marks
Seat No.
___________________________________________________
Instructions - (1) All Questions are compulsory.
(2) Answer each next main Question on a new
page.
(3) Figures to the right indicate full
marks.
(4) Assume suitable data, if necessary.
(5) Use of non-programmable Electronic
Pocket Calculator is permissible.

Marks
1. Attempt ant EIGHT of the following: 16
a) List any four object oriented programming languages.

b) Give syntax and example of defining structure and


declaring structure variable.

c) What is class? Give examples.

d) How memory is allocated when multiple object of a


class are created ? Explain with suitable example.

e) Define following terms:


(i) Default constructor
(ii) Parameterized constructor

f) What is destructor? How many destructors can be


defined in a single class ?

g) What is need of operator overloading?

h) Give significance of ‘&’ operator and ‘*’ operator.

i) Elaborate concept of overloading with example.

j) What is difference between compile-time polymorphism


and run-time polymorphism ?

2. Attempt any THREE of the following : 12


a) Can we create object of one class in definition of
other class? Explain with suitable example.

Object Oriented Programming: MSBTE Question Paper, Winter - 2007


b) Explain concept of virtual base class with suitable
example.

c) Define two functions with same name one return area of


circle whereas another returns area of rectangle.
Test these functions.

d) Can we use base class pointer for accessing member


function of derived class? Explain with suitable
example.

3. Attempt any THREE of the following : 12


a) Differentiate between calling function by value and
calling function by reference. Give suitable
examples.

b) Write a program to find length of string (without


using strlen( ) function)

c) Illustrate uses of virtual function with suitable.

d) Overload increment operator for class ‘point’ having


data member as x co-ordinate and y co-ordinate.

4. Attempt any TWO of the following : 16


a) Write a program to declare a class student
Containing data member roll number, name and percentage
of marks. Read data for 2 students and display data of
student having higher percentage of marks.

b) What do you mean by default argument? Illustrate


concept of constructor with default argument, with
suitable example.

c) Identify inheritance shown in following figure.


Implement it by assuming member function.

Class Name : Student

Member Variable :Roll No.,


Name

Class Name : Exam Class Name : Library


Member Variable : Subject Name Member Variable :Membership No.

Object Oriented Programming: MSBTE Question Paper, Winter - 2007


5. a) Attempt the following : 12
Explain difference between structure and class
with example.
b) Attempt any ONE of the following:
(i) Write a program that counts number of vowels
in a string.
(ii)Write a program that copies contents of one
file into another file.

6. Attempt any THREE of following : 12


a) Find errors from following code. Rectify the code.
class complex
{
int real,imaginary;
public :
void complex( );
void Read data( );
void Show data ( );
}

void main( )
{
Complex c1 ;
c1.Read data( );
c1.Display ( );
}
b) Explain use of following function with suitable
examples.
d) Explain use of ios::nocreate and ios::noreplace.
e) Describe built- in function for reading a line of text
from file. Give example.

______________

Object Oriented Programming: MSBTE Question Paper, Winter - 2007

Вам также может понравиться