Escolar Documentos
Profissional Documentos
Cultura Documentos
(a) delegation
(b) inheritance
(c) polymorphism
3. The streams is a
4. The buffer is a
(a) Private
(b) Public
(c) Protected
(d) Friend
10.Encapsulation means
(a) operator
(b) function
(c) class
13.A,B and C are objects of same class. To execute the statement C=A+B ,
the operator must be overloaded.
(a) +
(b) =
(a) public
(b) virtual
(c) void
(d) class
(a) 0 byte
(b) 2 byte
(c) 4 byte
(d) 8 byte
(a) pointer
(b) reference
(c) variable
(d) object
(a) at run-time
(a) Virtual
(b) Inline
(c) Static
(d) Void
(b) objects
(c) string
(b) globally
(c) anywhere
(d) in a class
28.Exception is generated in
29.A and B are two string objects. A=”abc” and B=”xyz”. A=A+B will produce
(a) “abcxyz”
(b) “abc”
(c) “xyzabc”
(c) () operator
(a) pointer
(b) array
(c) class
(a) object
(b) variable
(a) far
(b) public
(c) static
(a) 1 bytes
(b) 2 bytes
(c) 4 bytes
(d) 8 bytes
(b) 0 to 255
(c) 0 to 65535
(a) private
38.The : : is known as
(a) encapsulation
(b) polymorphism
(c) abstraction
Subjective Question:-
2. (a) Write a program to create a class complex which accepts real and
imaginary data member ,all constructor() ,destructor() and + operator
overloading function to add two objects and returns the sum as object.
(b) Define the difference between static binding and dynamic binding with
suitable example
3. (a) What is virtual function? Distinguish between virtual function and pure
virtual function with suitable example.
4. (a) What is static binding ? Distinguish between dynamic binding and late
binding.
5. (a) Write is virtual base class with suitable example ? Describe the
advantages of this class over inheritance.
(b) Write a program to create a class that have a number and recursive
prime() function to check whether the given data member is prime or not.
6. (a) Write a program to create base class that have two integer data
members but not constructor() function designed and derived class that have a
single data member and constructor() function which uses base class data in its
constructor and sum() function to computer the sum of three numbers .
(b) Why runtime exception need not be caught or specified? Give three
examples of runtime exception. What are the uses of stream class?
7. (a) Write a program to create a class that has a member function which
is friend function of another class with suitable example.
(b) What is stream? Define input stream and output stream hierarchy.
8. (a) What are the friend functions and friend classes? What are different
between object and variable?
(b) What are the uses of random access file over sequential access file
with example?
9. (a) What are type modifiers? Write a program to draw a square box .Use
for loop.
9. (b) Write a program which reads in names and phone numbers from a file
and outputs them in a nice order with a nice format. Your program should ask
the user to specify a file. if the file does not exist, the program should warn the
user and end. if the file does exit, the output is in nice format .
10. (a) What are static member variables and functions? Write a
program to count numbers between 1 to 100, which are not divisible by 2, 3 and
10. (B) Write a program that would create a set of student records and
stores into the file. The program should allow the user to add records of
new students or delete record if the student leaves the college. It should
also display all the records in ascending order of the student roll numbers.
(b) What is virtual destructor? How do they differ from normal constructor?
12. (a) Write a program to create a class employee that contains name, roll
and address, dynamic constructor and dynamic destructor to add or
remove records dynamically.
(b) Write a program to create array of string. Read and display the strings
using constructor and destructor.
13. (a) What are constant objects ? How they are declared?
14 (a) what is new and delete operator? Use it with the two matrices
addition program.
(b) Write a program to overload < operator and display the smallest
number out of two objects.
16 (a) Write a program to declare matrix class and perform addition of matrix
class objects.
(b) Write a program to define three classes A,B and C. Each class contains
private data members. Derive class C from A and B by applying multiple
inheritances. Read and display the data using constructors and
destructors.
17 (a) Describe the use of public, private, and protected access specifies.
19
(a) What is file? What are steps involved in manipulating a file in a C++
program.
(b) Explain the various file stream classes need for file manipulations ?
(b) What is data hiding? What are different mechanism for protecting data
from the external users of class’s objects? .