What does the following program segment output? for(f = 0; f < 3; ++f) for(g = 0;

Question:

What does the following program segment output?
for(f = 0; f < 3; ++f)
for(g = 0; g < 2; ++g)
System.out.print(f + " " + g + " ");
a. 0 0 0 1 1 0 1 1 2 0 2 1
b. 0 1 0 2 0 3 1 1 1 2 1 3
c. 0 1 0 2 1 1 1 2
d. 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2

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: