Question: [ Prob . 6 . Fundamental of Programming ] ( 2 5 p ) Which of the four statements below have the same semantics as

[Prob.6. Fundamental of Programming]
(25p) Which of the four statements below have the same semantics as the following statement?
Choose all of them.
while (--counter 1)
printf("%s
", counter %2? "even" : "odd");
(a) while (--counter 1)
if ( counter %2)
else
printf( "even);
printf("odd");
(b) while ( counter 1)
if (counter %2)
else
printf( "even);
printf("odd");
--counter;
(c) while ( counter 1){
if ( counter %2)
else
printf( "even);
printf( "odd");
--counter;
}
(d) do {
printf("%sln", counter %2? "odd" : "even");
--counter;
}) while ( counter 2);
 [Prob.6. Fundamental of Programming] (25p) Which of the four statements below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!