What does the following statement output? for(f = 1, g = 4; f < g; ++f, g)

Question:

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

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: