What is the output of the following code?

int a = 1;
int c = 0;
while (c < 4)
{
a = a + 1;
cout << a;
c = c + 1;
}

a) 2345
b) 1234
c) 23456
d) 12345

a) 2345

Computer Science & Information Technology

You might also like to view...

The built-in speech recognition software called Siri was created for the _____.

A. iPhone B. Android C. Windows phone D. Blackberry

Computer Science & Information Technology

Write statements that assign random integers to the variable n in the following ranges:

a) 1 ? n ? 2 b) 1 ? n ? 100 c) 0 ? n ? 9 d) 1000 ? n ? 1112 e) –1 ? n ? 1 f) –3 ? n ? 11

Computer Science & Information Technology