What is the output from each of the following loops?
a) ```
while ( 0 )
cout << ‘X’;
cout << endl;
```
b) ```
do
cout << ‘X’;
while ( y != y );
cout << endl;
```
c) ```
int i = 1;
while (i < 9)
{
cout i;
i++;
}
```
d) ```
d) char c = 'A';
do
{
cout << c << " ";
c = c + 2;
} while ( c <= 'M' )
cout << endl;
```
e) ```
int i = 0;
while (i < 50)
{
if ( i < 20 && i != 15 )
cout << 'X';
i++;
}
cout << endl;
```
The output of each loop is:
a. The only output is a carriage return.
b. X
c. 12345678
d. A C E G I K M
e. XXXXXXXXXXXXXXXXXXX (There are 19 Xs.)
You might also like to view...
The industry standard that allows you to connect your printer directly to your camera is ________
Fill in the blank(s) with correct word
A(n) ____ that only reflects the focus and interests of a single field will almost certainly have exploitable holes in it.
A. offense B. defense C. control D. mitigation