Ask Question

How many times does the following code execute?

int x=0;

int y=3;

While x<=y

x=x+1;

endWhile

A. 0 B. 3C. infiniteD. 4 Program design and development

+4
Answers (2)
  1. 27 May, 06:57
    0
    The first time the while statement is evaluated, x = 0 so the answer is D. 4
  2. 27 May, 07:07
    0
    Infinite because it is a infinite loop that is true and the first two lines were just declaring variables
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “How many times does the following code execute? int x=0; int y=3; While x ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers