blob5567 blob5567
  • 18-10-2019
  • Computers and Technology
contestada

What will the following code fragment print?

for (i = 0; i < 9; i++);

cout << i + 1;

cout << i;

Respuesta :

ExieFansler ExieFansler
  • 18-10-2019

Answer:

This code will print 109.

Explanation:

Condition is the integer i is declared before the loop then the code will print 109. 10 because of the statement cout<<i+1; and 9 because of the cout<<i; . The for loop starts with 0 and ends when the value of i becomes 9. Since there is semi-colon after the for loop so the next statement after the for loop is not included in the loop.

Answer Link

Otras preguntas

Davis has ten apples. Gus is hungry and eats a fifth of them, but Davis buys twice the amount gus ate the next day. How many apples is Davis left with after the
Question 1 unsaved the _____________________ suggests that what you see in the media is a reflection of what society thinks or feels.
How was the northern renaissance different from the renaissance in Italy?
Where are there reservations in the United States ??
6[5+(14-8) divides by 3]
how do I graph g(x)=f(x)+5
Solve for x. x+25=100 A. 4 B. 75 C. 125 D. 2500
Which expression is equivalent to 4 to the power of 6 multiplied with 4 to the power of negative 8
For each equation below , determine the value of y if x = 2 . 1) y=7-3x 2) y=18/x Please help !!
does a force cause motion or a change in motion