You are on page 1of 3

1.

C++ was originally developed by

Nicolas Wirth Donald Knuth Bjarne Stroustrup Ken Thompson


Ans : 3

2. The standard c++ comment

/ // /* and */ None of these


Ans : 2

3. The preprocessor directive #include is required if

Console output is Console input is Both console input


None of these
used used and output is used
Ans : 3

4. The operator << is called

an insertion
put to operator either a or b None of these
operator
Ans : 3

5. The operator >> is called

an extraction a get from


either a or b get to operator
operator operator
Ans : 3

6. When a language has the capability to produce new data type, it is called

Extensible Overloaded Encapsulated Reprehensible


Ans : 1

7. The C++ symbol <<

perform the action


of sending the value of is used to indicate
is adopted to
expression listed as its the action from right All the above
resemble an arrow
right to the outputs to left
strewn as the left.
Ans : 4

8. C++ name was suggested by

Rrick Mascitti Bjarne Stroustrup Donald Knuth Ken Thompson


Ans : 1

9. What is a reference?

a reference is an used to rename an


an operator None of these
alias for an object object
Ans : 2

10. A constructor is called whenever


a object is
an object is used a class is declared a class is used
declared
Ans : 1

11. State the object oriented languages

C++ Java Eiffel All of the above


Ans : 4

12. Overload function in C++

functions with
all have the same
a group function same name and same
number and type of All of the above
with the same name number and type of
arguments
arguments
Ans : 1

13. Operator overloading is

making c++ giving new


making new c++
operators works with meaning to existing both a& b above
operator
objects c++ operators
Ans : 4

14. A constructor is called whenever

a object is
an object is used a class is declared a class is used
declared
Ans : 1

15. A class having no name

can't have a can't have a can't be passed as


is not allowed
constructor destructor an argument
Ans : 3

16. The differences between constructors and destructor are

constructors can
constructors can
be overloaded but
take arguments but both a & b None of these
destructors can't be
destructor can't
overloaded
Ans : 3

17. A destructor takes

one argument two arguments three arguments Zero arguments


Ans : 4

18. Constructors are used to

initialize the construct the data


both a & b None of these
objects members
Ans : 1

19. In C++ a function contained with in a class is called

a member function an operator a class function a method


Ans : 1

20. The fields in a class of a c++ program are by default

protected public private None of these


Ans : 3