First Commit
This commit is contained in:
12
BitwiseOperators.c
Normal file
12
BitwiseOperators.c
Normal file
@@ -0,0 +1,12 @@
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user