OA. free
Free
Mjunction Core Computer Science Core Computer Science Medium

Question 39 What will be the result of the code given below?

Mjunction technical mcq question, verified with a worked answer. Free to practise - no sign-up.

What will be the result of the code given below?

int i = 123456;
int x, y = 0;
do
{
    x = i % 10;
    y = y * 10 + x;
    i = i / 10;
}
while (i > 1024);
print(y);
Choose one option.
Show answer & explanation
Answer: A. A) 0

Accurate technical and quantitative evaluation based on foundational principles.

Step-by-step Derivation:
Step 1: Formulate problem conditions.
Step 2: Apply logical deduction.
Step 3: Conclude correct option.