Given the following C code:
#include
void main( ) {
int a = 0;
int y;
?
}
// What option below when substituted in for the question mark (?) in the code, will produce the following output?
0123456789
// Given the following C code:
#include
void main( ) {
int a = 0;
int y;
?
}
// What option below when substituted in for the question mark (?) in the code, will produce the following output?
0123456789
for (y = 0; y < 10; ++y)
printf("%i", ++a);
y = 0;
while ( y < 10)
printf("%i", a++);
for (y = 0; y < 10; ++y)
printf("%i", a++);
y = 0;
while ( y < 10)
printf("%i", a++);
y++;
None of the above.
All of the above.