Quiz-C
Quiz-C
Question 1
Q. In Object Oriented programming, abstraction
refers to ?
• A. showing only the essential features of the
application and hiding the details.
• B. data binding.
• C. reuse once written code again and again
• D. features which allows to create functions with
same name
Question 2
2. How to access the object in the class?
a) scope resolution operator
b) ternary operator
c) direct member access operator
d) none of the mentioned
Question 3
int main( )
What is the output of the {
following program? Box Box1;
double volume;
#include <iostream> Box1.height = 5;
using namespace std; Box1.length = 6;
class Box Box1.breadth = 7.1;
{ volume = Box1.height *
public : Box1.length * Box1.breadth;
double length; cout << "Volume of Box1 : " <<
double breadth; volume <<endl;
double height; return 0;
}; }
a) 210
b) 213
c) 215
d) 217
Question 4
How many objects can present in a single class?
a) 1
b) 2
c) 3
d) as many as possible
Question 5
Why is a class useful in programming?
A - No output
B - Error, as the function is not called.
C - Error, as the function is defined without its declaration
D - Error, as the main() function is left empty
Question 7