Mega Code Archive

 
Categories / C Tutorial / Operator
 

Bitwise or

# include<stdio.h> main() {   char c1 = 4,c2 =6 ,c3 = 3;   c3 = c1 | c2;   printf("\n Bitwise OR i.e. c1 | c2 = %c",c3); } Bitwise OR i.e. c1 | c2 = ? Suppose c1 = 4, c2 = 6; The value of c1 | c2 is interpreted as follows: 0000 0100   | 0000 0110     -----------     0000 0110