13 lines
361 B
C
13 lines
361 B
C
// WAP to perform bitwise operators.
|
|
|
|
void main()
|
|
{
|
|
int a = 12, b = 25;
|
|
printf("Values of a = %d, b = %d \n", a, b);
|
|
printf("Output for AND = %d\n", a&b);
|
|
printf("Output for OR = %d\n", a|b);
|
|
printf("Output for XOR = %d\n", a^b);
|
|
printf("Output for left shift to 3 = %d\n",a<<3);
|
|
printf("Output for right shift to 2 = %d\n",a>>2);
|
|
}
|