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

OOP Sample Question Paper - 3

This document contains a sample question paper for an exam with 6 questions covering various C++ programming concepts. Question 1 has 8 short answer questions about C++ topics like inheritance, I/O streams, class member functions, etc. Question 2-5 have 3 long answer questions each about more advanced topics like protected access, operator overloading, file handling, error checking code. The final question has 2 long answer questions involving implementing multiple inheritance with a virtual base class and string manipulation.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
753 views2 pages

OOP Sample Question Paper - 3

This document contains a sample question paper for an exam with 6 questions covering various C++ programming concepts. Question 1 has 8 short answer questions about C++ topics like inheritance, I/O streams, class member functions, etc. Question 2-5 have 3 long answer questions each about more advanced topics like protected access, operator overloading, file handling, error checking code. The final question has 2 long answer questions involving implementing multiple inheritance with a virtual base class and string manipulation.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Sample Question Paper – III

9036
3 Hours / 80 Marks Seat No.

Q 1: Attempt any Eight of the following: (2 x 8 = 16)


a) Draw the diagram of hierarchical inheritance.
b) Why cin and cout are not keywords?
c) Write syntax, how to define member function outside of class?
d) What is forward declaration?
e) Give the use of const member function.
f) What is use of setiosflags ( )?
g) How to remove already set ios flags?
h) Why class containing pure virtual function is an abstract class?
i) Explain the use -> operator.
j) What use of :: ( scope resolution operator.)
k) Give syntax multiple inheritance.

Q 2: Attempt any THREE of the following: (4 x 3=12)


a) Explain how ‘protected’ is different than ‘private’ with example.
b) Write the rules for operator overloading.
c) Explain use of destructor with example.
d) How to call array of object using pointers?

Q 3: Attempt any THREE of the following: (4 x 3=12)


a) How to nest the classes? Explain with suitable example.
b) Explain put ( ) & getline ( ) function of stream classes.
c) How to handle the file in binary mode?
d) Write a program which calls constructor with default arguments.
Q 4: Attempt any THREE of the following: (4 x 3=12)
a) Differentiate procedure oriented & object oriented programming.
b) Explain significance of static functions.
c) Write a program to find number of vowels in user entered string.
d) Explain how can you convert no on decimal, hex, & octal equivalent.
e) Give detailed use of noreplace & nocreate file opening modes.

Q 5 : Attempt any THREE of the following: (4 x 3=12)


a) Find out error it any in following code.
class Triple {
int i;
Triple ( )
{
i = 10;
}
public:
Triple (int x)
{

-1-
i = x;
}
};
void main ( )
{
Triple T (20);
}

b) If a function is called by value & called by reference then is it overloaded?


Justify.
c) Explain, how to overload pre-increment & post-increment operators?
d) Constructors can be overload. Justify.

Q 6: Attempt any TWO of the following: (8 x 2=16)


a) Write a program to implement multiple inheritance of following figure. Use
virtual base class.

Account

Sav_Account Cur_Account

Fixed_dep_acc

b) Write a program to open file in reading mode & copy only uppercase letters from
that into another file use istream & ostream only.
c) i) Different structure & class.
ii) Write a program to accept two strings from user & concatenate one string to
another using pointer to string.

-2-

You might also like