60

, 2.

79

, 3.

98

, 4.

117

">
MCQs > IT & Programming > Embedded C >

What will be the output of the following code?

#include <stdio.h>

void main()

{

    int p=5, a, j, k, t, b;

    int num[]={1,2,3,4,6};

    b = num[0];

    for (a = 1; a < p – 1; a++)

    b = b ^ num[a];

    for (a = 2, k = 1; a <= p; a++)

    k = k ^ a;

    k = k ^ b;

    printf("%d", k+(k*18)+3);

}


Embedded C MCQs

What will be the output of the following code?

#include <stdio.h>

void main()

{

    int p=5, a, j, k, t, b;

    int num[]={1,2,3,4,6};

    b = num[0];

    for (a = 1; a < p – 1; a++)

    b = b ^ num[a];

    for (a = 2, k = 1; a <= p; a++)

    k = k ^ a;

    k = k ^ b;

    printf("%d", k+(k*18)+3);

}


Answer

Correct Answer:

98

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Embedded C Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Embedded C Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it