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

What is the output of the following program?

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

What is the output of the following program?

int main()
{
    int a = 2;
    d=(a=2)
    {
        a = a + 2 + 1;
        printf("%d",a);
    }
    else
    {
        break;
    }
}
Choose one option.
Show answer & explanation
Answer: A. A) Compilation error

Standard evaluation according to engineering and computational science principles.

Step-by-step Derivation:
Step 1: Analyze problem specification.
Step 2: Derive theoretical solution.
Step 3: Select corresponding answer option.