Multiple choice

Find out the output of the given program in binary language.

#include 
#include 
int main() {
  int a = 7, b = 15, c;
  c = a | b;
  printf("The result comes out to be : %d", c);
  getch();
}

  1. The result comes out to be 0111.

  2. The result comes out to be 1111.

  3. The result comes out to be 0111.

  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

This program will just OR the binary values of 7 and 15.