QUESTION 10 What would be the output produced from the following statements? int
ID: 3700514 • Letter: Q
Question
QUESTION 10
What would be the output produced from the following statements?
int i = 0;
while (i < 0)
{
Write("{0} ", i);
i++;
}
Write("{0} ", i);
0
an infinite loop
an error
0 0
none of the above
QUESTION 11
The third programming construct repetition is also called ____________.
QUESTION 12
How many times is the loop body of the while statement executed?
int i = 0, g = 0, s = 0, t = 0, z = 0;
string sValue;
while (i < 5)
{
inValue = ReadLine( );
t = Convert.ToInt32(inValue);
s = s + t;
if (t > ?1)
g = g + 1;
else
z = z + 1;
i = i + 1;
}
once
never
four times
five times
until a number 5 or larger is entered
0
an infinite loop
an error
0 0
none of the above
Explanation / Answer
Ans:10
Option A is correct.
Explantion: while(i<0) since is i is zero hence while condition is not executes
it print Write("{0} ", i); 0
===============================================================
Ans:11
The third programming construct repetition is also called repetition.
===============================================================
Ans:12
four times
==============================================================
Kindly Check and Verify Thanks..!!!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.