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

What will be the output of the code snippet given below?

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

What will be the output of the code snippet given below?

int main() {
    int a=10, b=5;
    unsigned char ch1 = 7, ch2 = 7;
    ch1=getbit("~x", ch2, 7);
    printf("%u", ch1);
    return 0;
}
Choose one option.
Show answer & explanation
Answer: A. A) 222

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.