Multiple choice

Find the output of the given program or error if any, and give the answer of the program in binary language.

int main()
{
int a=7, b=15, c;
c=a|b;
printf(the result comes out to be is :- %d,c);
getche();
}

  1. The result comes out to be 0111.

  2. The result comes out to be 1111.

  3. The result comes out to be 1000.

  4. The result comes out to be 0110.

  5. Error in the program

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

Binary of 7 is  0111. Binary of 15 is 1111. So ORing them result comes out to be 1111.