Ask Question
27 October, 09:55

The following is an example of what kind of loop?

int x = 0;

while (x < 10)

x=x + 1;

a counter controlled loop

an infinite loop

a sentinel controlled loop

this code will not compile

+4
Answers (2)
  1. 27 October, 12:48
    0
    The answer is "a counter controlled loop".

    Explanation:

    The explanation of the given code as follows:

    An integer variable x is initialized with 0. Using a while loop to check the condition repeatedly. The loop will execute until the value of x is less than 10 and the incrementing value of x variable by one. It is not an infinite loop. The sentinel controlled loop is used when the coder doesn't know the number of iteration to occur in the loop. In other words, we can say that it is opposite to counter controlled loop.
  2. 27 October, 13:12
    0
    Step by step equation
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “The following is an example of what kind of loop? int x = 0; while (x < 10) x=x + 1; a counter controlled loop an infinite loop a sentinel ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers