Question: What does the following statement output? for(f = 1, g = 4; f < g; ++f, g) System.out.print(f + + g +

What does the following statement output?
for(f = 1, g = 4; f < g; ++f, ––g)
System.out.print(f + " " + g + " ");
a. 1 4 2 5 3 6 4 7…
b. 1 4 2 3 3 2
c. 1 4 2 3
d. Nothing

Step by Step Solution

3.48 Rating (174 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

c... View full answer

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 Java Programming Questions!