Important Practice Question Available for Exam. This Questions are based on Repeated Topics and Frequently Ones with the Help of this you can Score Good Marks in Exam and you will Pass in Exam.
Get Updates on: WhatsApp YouTube Instagram
1. Attempt any FIVE of the
following: 10
a) State any four object oriented
languages.
b) Describe use of protected
access specifier used in the class.
c) Differentiate between OOP and
POP. **
d) Write any two characteristics
of destructor.
e) Describe meaning of following:
*
(i)
ios : : in
(ii)
ios : : out
f) 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.’
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 following figure: *
b) Write a C++ program to print multiplication table of 7. (example: 7 × 1 = 7 ..... 7 × 10 = 70)
c) Write a C++ program to swap two integer numbers and swap two float numbers using function overloading. (Hint : overload swap function) *
d) Write a C++ program to count number of spaces present in contents of file. *
e) Write a C++ program to find greatest number among two numbers from two different classes using friend function.
f) Describe following terms: Inheritance, data abstraction, data encapsulation, dynamic binding.
g) State and describe visibility modes and its effects used in inheritance.
h) Differentiate between contractor and destructor
5. Attempt any TWO of the following: 12
a) Write a C++ program to overload
binary operator ‘+’ to concatenate two strings.
b) Write a C++ program to write ‘Welcome
to poly’ in a file. Then read the data from file and display it on screen. *
c) Write a C++ program to declare
a class ‘Account’ with data members as accno, name and bal. * Accept data for eight accounts and
display details of accounts having balance less than 10,000.
d) (i) Write any three rules of
operator overloading.
(ii) Write a program in C++ to overload unary ‘_’ operator to negate
values of data members of class.*
e) Write a C++ program to append
data from abc .txt to xyz .txt file.
f) Write a C++ program to declare
a class student with members as roll no, name and department. Declare a
parameterised constructor with default value for department as ‘CO’ to
initialize members of object. Initialize and display data for two students. *
6. a) Attempt any TWO of the following: 12
(i) Write a C++ program to find whether the entered number
is even or odd.
(ii) Write a C++ program to declare a structure employee
with members as empid and empname. Accept and display data for one employee
using structure variable.
b) Write a C++ program to implement following inheritance. *
Accept and display data for one programmer and one manager. Make display function virtual.
c) Write C++ program for following multilevel inheritance. **
NOTE: This is Not Official MSBTE Website: We Provide Important Practice Questions for Students to Score Good Marks in Exam and this Questions is based on Important Topics of Syllabus and Repeated Ones. So, with the help of this we help student to Not get KT / or / They will Not get Fail in Exam.