22316 IMP Object Oriented Programming Using C++ MSBTE Exam Important Questions
22316 IMP
1. Attempt any FIVE of the following: 10
1. State the difference between OOP and POP.
2. State any four object oriented languages
3. Write two properties of static member function.
4. Write any four benefits of OOP.
5. Describe ‘this’ pointer with an example
6. Explain virtual base class with suitable example.
7. Describe use of protected access specifier used in the class.
8. Differentiate between OOP and POP.
9. Write any two characteristics of destructor.
10. Describe meaning of following:
(i) ios : : in
(ii) ios : : out
11. Give output for following code:
class student
{
int roll no;
char name [14];
} s[6];
void main( )
{
cout <<sizeof(s);
}
g) Write syntax to define a derived class.
h) State the use of cin and cout.
i) State use of scope resolution operator.
j) Define class and object
k) Describe use of static data member.
2. Attempt any THREE of the following: 12
a) Write a C++ program to accept array of five elements, find and display smallest number from an array.
b) Write a C++ program to declare a class ‘College’ with data members as name and college code. Derive a new class ‘student’ from the class college with data members as sname and roll no. Accept and display details of one student with college data.
c) Write a C++ program to declare a class ‘circle’ with data members as radius and area. Declare a function getdata to accept radius and putdata to calculate and display area of circle.
d) With suitable example, describe effect of ++ and – – operators used with pointer in pointer arithmetic.
e) Write a ‘C++’ program to find factorial of given number using loop.
f) Differentiate between run time and compile time polymorphism.
g) Describe memory allocation for objects.
3. Attempt any THREE of the following: 12
a) Write a C++ program to declare a class addition with data members as x and y. Initialize value of x and y with constructor. Calculate addition and display it using function ‘display.’
Write the applications of object oriented programm
b) State the rules for writing destructor function.
c) What is inheritance? Give different types of inheritance. d) What are the rules for virtual function?
b) With suitable diagram describe structure of C++ program.
c) Describe the concept of virtual base class with suitable example.
d) Describe use of static data member in C++ with example.
e) Accept data for five students and display it. Write a C++ program to displya sum of array elements of array size n:
f) Describe with examples, passing parameters to base class constructor and derived class constructor by creating object of derived class.
g) Describe how memory is allocated to objects of class with suitable diagram.
4. Attempt any THREE of the following: 12
a) Write a C++ program to implement inheritance shown in the following figure:
Accept and display data for one car with all details