Friday, July 24, 2009

C++ Objective Type

Previous Next

Indicate which data type is not part of standard C++.
a) bool
b) int
c) real
d) double
Ans : C


Which one of the choices would produce the following output ?
a) cout << "Hello" << "World"; b) cout << "Hello \n World"; c) cout << "Hello World\n"; d) cin >> "Hello World";
Ans : D


What is the output of the following code?
for (int i=0; i<10;>


What is the output of the following code? for (int a = 1; a <= 1; a++) cout <<>


For which values of the integer _value will the following code become an infinite loop?

int number=1;

while (true)

{

cout <<>

if (number == 3) break;number += _value;

}
a) only 0
b) only 1
c) only 2
d) only 1 or 2
Ans : B

Previous Next

No comments:

Post a Comment