B.C.A. (Sem-II)
END SEMESTER EXAMINATION - 2020
Object Oriented Programming with C++
2BCA-3
TIME: 3 HOURS MAXIMUM MARKS: 70
NOTE: Candidates are required to give answer in their own words as far as practicable.
The questions are of equal value
Answer any five questions.
Q-1 Choose the correct alternative from the following
(i) Which is private member functions access scope?b) Member functions which can used outside the class
c) Member functions which are accessible in derived class
d) Member functions which can't be accessed inside the class
(ii) What are the public member functions?
b) Functions accessible outside the class directly
c) Functions accessible everywhere using object of class
d) Functions that can't be accessed outside the class.
(iii) What is an exception?a) Problem arising during compile time
b) Problem arising during runtime
c) Problem in syntax
d) Problem in IDE
(iv) Which among the following best defines static variables members?a) Data which is allocated of each object separately
b) Data which is common to all the objects of a class
c) Data which is common to all the classes
d) Data which is common to a specific method
(v) Passing object to a functiona) Can be done only in one way
b) Can be done in more than one ways
c) is not possible
d) Is not possible in OOP
(vi) The objecta) Can be passed by reference
b) Can be passed by value
c) Can be passed by reference or value
d) Can be passed with reference
(vii) The this pointer is accessiblea) Within all the member functions of the class
b) Only within functions returning void
c) Only within non-static functions
d) Within the member functions with zero arguments
(viii) What are the arguments?a) Arguments which are not mandatory to be passed
b) Arguments with default value that aren't mendatory to be passed
c) Arguments which are not passed to functions
d) Arguments which always take same data value
(ix) What are upcasting?a) Casting subtype to supertype
b) Casting super type to subtype
c) Casting subtype to super type and vice versa
d) Casting anytype to any other type
(x) What is downcasting?a) Casting subtype to supertype
b) Casting supertype to subtype
c) Casting subtype to supertype and vice versa
d) Casting anytype to any other type
(xi) What are automatic variables?a) Global variables
b) Implicit/temprorary variables
c) Local variables
d) System variables
(xii) What are inbuilt classes?a). The predefined classes in a language
b) The classes that are defined by the user
c) The classes which are meant to be modified by the user
d) The classes which can't be used by the user
(xiii) Which among the following not an inbuilt class in C++?a) System
b) Color
c) String
d) Functions
(xiv) Which among the following is a correct statement for variables?a) Variables can be declared many times
b) Variables can be declared only one time
c) Variables declaration can't be done more than ones
d) Variables declaration is always done more that one time
Q-2 What is the friend function? Write syntax and characteristics of the friend function.
Q-3 What is exception? Explain how exception is handled in C++.
Q-4 What is the operator overloading? List the operators that cannot be overloaded in C++.
Q-5 Expalin th parameterized and dynamic construction with suitable example.
Q-6 Write a C++ program to calculate square and cube of an integer number by using inline function.
Q-7 Write a C++ program to calculate sum of integer and float array elements of size 5 by using function template.
Q-8 Write a C++ program to create a class product which contains data member as name, price and quantity. Write a member function to accept quantity for each product and accordingly generate and display the bill.
Q-9 Write a C++ program to read the content of a text file and count number of characters.
Q-10 Write the short notes in the following
- Inline function
- Inheritance
- C++ predefined Stream
- This pointer
...