ProAnswers.org

Write a C program to operate OR operation on two integers and display the result.?

#include

#include 

void main() 

{ 

int a,b,c; 

clrscr(); 

printf(“Read the integer from keyboard(a&b):”); 

scanf(“%d%d”, &a, &b); 

c=a|b; 

printf(“The answer after OR operation is (c)=%d”, c); 

getch(); 

} 

Output: 

Read the integer from keyboard (a&b): 8 4 

The answer after OR operation is (c)= 12