Multiple choice

Find the output of the above program or error, if any.

#include<stdio.h>

#include<conio.h>

int main()

{

int a=8, b=2,c;

c=a^b;

printf(“the result is C=%d”,c);

getch();

}

  1. The result is C = 8.

  2. The result is C = 10.

  3. The result is C = 16.

  4. The result is C = 0.

  5. Error in the program.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The correct answer is 10.