Page 1 of 2
onlineqp.com
BCA 3rd SEMESTER EXAM. 2014
OBJECT-ORIENTED PROGRAMMING USING C++ CODE- 303301
Time: 3 hours Full Marks: 60
Instructions:
i. The Marks are indicated in the right -hand margin.
ii. There are SEVEN questions in this paper.
iii. Attempts FIVE question in all.
iv. Question Nos. 1 and 2 are compulsory.
1. Answer the following as directed (any six). 6*2=12
(a) Base class pointer cannot point to derived class
(State True or False)
(b) Which of the following is not the member of class
(I) Static function (II) Friend function
(III) Const function (IV) Virtual function
(c) Which of the following access specifies is used in a class definition by default?
(I) Protected (II) Pubic
(III) Private (IV) Friend
(d) What happens when a class with parameterized constructor and having no default
Constructor is used in a program and we create an object that needs a zero-
arguments constructor?
(e) If the programmer does not explicitly provide a destructor, then creates an empty
destructor. (Fill In the blanks)
(f) What is the use of function call operator?
(I) Overloading the method (II) Overloading the objects
(III) Overloading the parameters (IV) none of the above
(g) Which of the following advantages we lose by using multiple inheritances?
(I) Dynamic binding (II) Polymorphism
(III) Both (i) and (ii) (IV) none of the above
akubihar.com (h) Which of the following is referred by pointers to member?
Page 2 of 2
onlineqp.com
(I) Static members of class objects (II) Non-static members of class objects
(III) Referring to whole class (IV) none of the above
(i) What does derived class not inherit from the base class?
(I) Friends (II) Operator = () members
(III) Constructor and destructor (IV) A of the above
(j) Which other keyword are also used to declare the class other than class?
(I) Struct (II) Union
(III) Object (IV) both (i) and (ii)
2. Answer any three of the following: 3*4=12
(a) What is an operator function? Describe its syntax.
(b) Explain the characters of constructor and destructor.
(c) Write syntax for overloading extraction and insertion operator with friend function.
(d) Explain the mechanism for accessing private member of the base class using pointers.
(e) Describe various errors trapping function.
Answer any three of the following: 3*12=36
3. (a) What is function overloading? What are the rules for defining overloaded functions? Precautions
should us tae while overdoing function? 6
(b) Write a program in C++ to use bit fids with cases display the contents of the objects. 6
4. (a) How are the constructor and destructor called explicitly? What is the difference between
their calling methods? 6
(b) Write a program in C++ to pass an object to constructor and carry out copy constructor
display contents of the objects. 6
5. What is operator overloading? Explain the conversion of basic data type to class type and class
type to basic type with appropriate example. 12
6. (a) Describe various type of inheritance with example. 6
(b) Write a program in C++ to declare class X Y and Z. Each class contains one character array as
a data member. Apply multiple inheritance. Concatenate strings of class X and Y and store it in Z.
Show all the three strings. Use constructor and destructor. 6
7. (a) What are templates? Explain its need. How can normal function be declared as template function?
(b) Write a program in C++ to use exception handing with constructor and destructor.
akubihar.com 6*2=12