C++

C++ Objective Questions And Answers

More interview questions and answers

C++ was invented by a. Donald Drum b. Ken Thompson c. Bjarne Stroustrup

Which one is use for standard C++ comment. a. / b. /* */ c. //

What the use of preprocessor directory(# include) a. Used for console output b. Used for console input c. Used for both console input and output

In C++ operator << is called as a. an insertion operator or put to operator b. an extracton operator or get from operator c. an insertion operator or get from operator

In C++ operator >>is called as a. an extraction operator or get from operator b. an insertion operator or put to operator c. an extraction operator or put to operator

Who suggest C++ name? a. Bjnare Stroustrup b. Ken Thompson c. Rrick Mascitti

Constructor is called when a. a method is declared b. a class is declared c. a object is declared

Who is differ from other? a. C b. C++ c. Java

Function overloading in C++ is a. a group function with the same name b. all have the same number and type of arguments c. functions with same name and same number and type of arguments

Opertor Overloading is like that a. giving new meaning to existing C++ operators b. making c++ operators works with objects c. both a and b

Destructor can contain a. Zero arguments b. One arguments c. Two arguments

How constructor differ from destructor a. constructors can be overloaded but destructors can't be overloaded b. constructors can take arguments but destructor can't c. both a and b

In C++ a function contain in class called as a. a method b. a member function c. a class function

By default fields in a C++ class are a. Public b. Private c. Protected

What is output of follwoing int main() { cout << "R4R" << endl; return 0; } 1.Execution time error 2.Syntax error 3.R4R 4.None

What is output of following #include int main() { cout << "R4R" << endl; return 0; } 1.Execution time error 2.Syntax error 3.R4R 4.None

What is output of follwoing int main() { int a=000; cout << "R4R:"; cout << a; return 0; } 1.Execution time error 2.Syntax error 3.R4R:0 4.None

C++ Objective Questions And Answers