You are on page 1of 3

C++ Question Paper

Time 45 Minutes

1.

The ______ operator is used to return the remainder of a


division operation.

2.

In c++ , default access specifier of a class is ________.

3.

Class is a collection of similar kind of ________.

4.

The keyword _______ eliminates an function overriding.

5.

Which one of the default argument/arguments are true:


A.
int f(int i=0,int j,int k=0);
B.
int f(int i=0,int j=0,int k=0);
C.
int f(int i=0,int j=0,int k);
D.
int f(int i,int j,int k=0);
Reference variable is a _____ name of a previously defined
variable.

6.

7.

class A
{
friend f()
{
...............
...............
}
};
how can i access the function f() if object of class A is a:A.
B.
C.
D.

A.f();
f();
a.f();
we cant access the friend function outside the
class.

8.

Which keyword is use before the function of base class to


avoid function overriding?

9.

class A
{

public:
int f(int a,int b)
{
//body
}
int f(int a)
{
//body
}
int f(int a,float b)
{
//body
}
};
In class A the function f() is _______ for three times.
A.
B.

overloaded
overrided

10.

We cannot create object of the ___________ class.


A. Static
B. Virtual
C. Abstract
D. Public

11.

Static functions in a Class can only access __________


variable.
A. Public
B. Private
C. Protected
D. Static

12.

Default value of the static variable is ____________.

13.

Polymorphism means ________ name but __________ forms.

14.

C++ programming structure supports which programming


approach?
A. Top-Down
B. Bottom-up.

15.

Inheritance is used in oops for code ______________.

16.

Whenever object of class is created, __________ of the class


is invoked.

A. Destructor
B. Constructor
C. Function
D. Variable
17.

The Private member of the class can be accessed by:


A. Member function of the class
B. Non-member function of the class
C. Member function of a derived class if it is declared
privately
D. Member function of a class if it is declared publicly.

18.

If Class A inherits from Class B. The Class A is called


____________ class and class B is called ___________ class.

19.

Which of the following operators cannot be overload?


A. ++
B. Sizeof
C. ::
D. +

20.

Function overloading is a ______________ polymorphism and


function over- ridding is a _________________ polymorphism.
In function overloading parameter signature of the
functions is depends on ________ , _________ and ________ of
the argument.

21.

22.

The Inline function can consist of a return statement.


(True/false)

23.

this pointer point to this object for which member


function is invoked. (True/false).

24.

We cannot overload member access operator. Example


{. or .*} (True/False)

25.

C++ programming supports Generic Programming


approach .(True/False)

You might also like