51) Choose the option not applicable for the constructor.

A. Cannot be called explicitly.

B. Cannot be overloaded.

C. Cannot be overridden.

D. None of the above.

Answer : C

52) An exception is __

A. Runtime error

B. Compile time error

C. Logical error

D. None of the above

Answer : A

53) What will be the output of the following program?

#include<iostream>

#include<string.h>

using namespace std;

main() {

   cout<<strcmp(“strcmp()”,”strcmp()”);

}

A. 0

B. 1

C. -1

D. Invalid use of strcmp() function

Answer : A

54) What is the output of the following program?

#include<iostream>

using namespace std;

int x = 5;

int &f() {

return x;

}

main() {

f() = 10;

   cout<<x;

}

A. 5

B. Address of ‘x’

C. Compile error

D. 10

Answer : D

55) What is the output of the following program?

#include<iostream>

using namespace std;

void main() {

   char s[] = “C++”;

cout<<s<<” “;

s++;

cout<<s<<” “;

}

A. C++ C++

B. C++ ++

C. ++ ++

D. Compile error

Answer : D

error: Content is protected !!