What will be the value of x after the following code is executed?
int x = 10, y = 20;
While (y < 100)
{
X += y;
}
A) 90
B) 110
C) 210
D) this is an infinite loop
Correct Answer:
Verified
Q44: Select all that apply. Which method of
Q45: Which of the following statements will create
Q46: Which of the following are pre-test loops?
A)
Q47: Select all that apply. Which of the
Q48: A random number, created as an object
Q50: In the following code, what values could
Q51: The variable that controls the number of
Q52: In the following code, what values could
Q53: What will be the value of x
Q54: Each repetition of a loop is known
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents