Sunteți pe pagina 1din 2

9036

0809-1
3 Hours / 80 Marks

1. Attempt any Eight of the following: 16


a) Define inline function. Write its syntax. Give its example.
b) Define polymorphism. Give example.
c) Define friend function. Give example.
d) Define multiple inheritance. Give example.
e) What is an abstract base class?
f) List any two input and two output manipulators.
g) What is dynamic binding?
h) Mention the concepts of OOP.
i) How to define a member function outside the body of class?
j) What are rules governing the declaration of a destructor member function?

2. Attempt any three of the following: 12


a) What is virtual base class? Explain with suitable example.
b) Describe the process of operator overloading with example.
c) Can base class pointer be used to call virtual function? Justify your answer.
d) Comment on the following statement if display( ) is a static member function of
a class student. Can it be called in the following way:
Student s1;
s1.display( );

3. Attempt any three of the following: 12


a) Explain the static binding with example.
b) How to initialize a pointer? Explain with syntax.
c) Write a program to count number of characters in a word using pointer to string.
d) Explain how friend function used to overload binary operator?

4. Attempt any two of the following: 16


a) Write a program to declare a class ‘student’ consisting of data members
stud_name and roll_no. write the member functions accept( ) to accept and
display( ) to display the data for four students.
b) Write a code to reverse a string by overloading method.
c) Explain ios :: in and ios :: out with examples. Write any four ios format
functions.

5. Attempt the following:


a) Distinguish between OOP and POP. 4
b) Attempt any one of the following: 8
I. Write a program to generate a Fibonacci series of ‘n’ numbers using
runtime binding (the series should be : 1 1 2 5 3 8 ….).
II. Write a program for creating a text file and then count the numbers of line
in that file.
6. Attempt any three of the following: 12
a) State the syntax of seek( ) and tell( ) function related to file.
b) Give syntax and use of :
I. Open( ) function.
II. Close( ) function.
c) Explain arrays of object with example.
d) State the use of default parameters in constructor with suitable example.

S-ar putea să vă placă și