Question: What would the following code fragment print if it were part of a valid program? int j; for (j = 0; j < 11; j

What would the following code fragment print if it were part of a valid program? 

int j;
for (j = 0; j < 11; j += 3)
cout << j;
cout << endl << j << endl;

Step by Step Solution

3.35 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The program prints 0 3 6 9 12 15 18 ... 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 Introduction Java Program Questions!