The statement
while (--counter >= 1) {
printf("%s\n", counter % 2 ? "even" : "odd");
}
can not be rewritten as
a)
while (--counter >= 1) {
if (counter % 2) {
puts("even");
}
else {
puts("odd");
}
}
b)
while (counter >= 1) {
if (counter % 2) {
puts("even");
}
else {
puts("odd");
}
}
--counter;
c)
while (counter >= 1) {
if (counter % 2) {
puts("even");
}
else {
puts("odd");
}
--counter;
}
d)
do {
printf("%s\n", counter % 2 ? "odd" : "even");
--counter;
} while (counter >= 2);
b)
while (counter >= 1) {
if (counter % 2) {
puts("even");
}
else {
puts("odd");
}
}
--counter;
You might also like to view...
In an expression in Access, the ________ is called the "bang operator."
Fill in the blank(s) with correct word
____________________ is the act of sending copies of one database to another database within a network.
Fill in the blank(s) with the appropriate word(s).
If you are a Windows user and use a laptop or a keyboard without a keypad and want to insert special characters, use the ____________________ utility that comes free with Windows.
Fill in the blank(s) with the appropriate word(s).
The end of an event or use case is when the system is at rest in a consistent state.
True or False?