int i int i 1; while (i < 10) if (i % 2 cout <« i << endl; int i while (i < 10) if (i % 2 cout <« i++ « endl; 1; 13; while (i < 10) if (i++ % 2 cout << i << endl; 0) 0) 0) =%3= == (a) (b) (c)

LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
5th Edition
ISBN:9781337569798
Author:ECKERT
Publisher:ECKERT
Chapter7: Working With The Bash Shell
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question

How many times are the following loop bodies repeated? What is the printout of each loop?

 

int i
int i
1;
while (i < 10)
if (i % 2
cout <« i << endl;
int i
while (i < 10)
if (i % 2
cout <« i++ « endl;
1;
13;
while (i < 10)
if (i++ % 2
cout << i << endl;
0)
0)
0)
=%3=
==
(a)
(b)
(c)
Transcribed Image Text:int i int i 1; while (i < 10) if (i % 2 cout <« i << endl; int i while (i < 10) if (i % 2 cout <« i++ « endl; 1; 13; while (i < 10) if (i++ % 2 cout << i << endl; 0) 0) 0) =%3= == (a) (b) (c)
Expert Solution
steps

Step by step

Solved in 4 steps with 7 images

Blurred answer
Knowledge Booster
Basics of loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L