Question: What will the following code output? (For an infinite loop, type IL) 1) int x = 5; int y = 18; while (y >= x)

What will the following code output? (For an infinite loop, type "IL")

1) int x = 5; int y = 18; while (y >= x) { cout << y << " "; y = y - x; }

2) int z = 0; char c = 'y'; while (c = 'y') { cout << z << " "; cin >> c; z = z + 1; }

3) int x = 10; while (x != 3) { cout << x << " "; x = x / 2; }

4) int x = 0; while (x <= 5) { cout << x << " "; }

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!