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 difference of two numbers is equal to 0.6. Their quotient is also 0.6. What are the numbers? there are 4 numbers
What do dimensions indicate
Mrs. Palmer, from Sense and Sensibility, is an extroverted gossip. What is her husband like? Select all that apply. grouchy thoughtful methodical unsociable
which section of the the sentence is an independent clauses ? like fluffy bits of cotton candy
_____ is the creation, modification, or extension of software by people who are nonprofessional software developers.
what makes up a code for each amino acid
Which of the following is a claim of special relativity? A. All laws of physics apply to frames of reference that start from rest. B. All laws of physics
8m and 12.8 and 10 and 13. What is the area of the prism
a style of parenting that is democratic in nature, rules are not set in stone and children's ideas and concerns are listened to. children of this style parentin
What is the volume occupied at stp by a mixture of 4.00 g of he(g),?