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

The temperature went up by 5.C , then down by 3 ∘ C and finally an increase of 9 ∘ C , ending up at a temperature of 3 7 ∘ C. What was the starting temperature?
FILL THE BLANK. the __________ security act allowed for close surveillance of the communist party in the united states.
2.5+4(3/4a - 5) - 9.5
Can someone help me with this problem?
a(n) ________ menu offers items that are individually priced.
a bus starts from rest and attains an acceleration of 2m/S2 after 10 seconds. find the distance covered by the bus in that time​
list all the new countries displayed on the 1919 map that were not present during 1914
as the heart beats, friction between the pericardial membranes is prevented by:
write in your own words a summary about the train to freedom
what appendix in the cpt manual contains a complete list of all modifiers?