Monday, 23 February 2015

Bitwise Operator in C


#include<stdio.h>
#include<conio.h>
main()
{
int a=5,b=4;
clrscr();
printf("\n a&b :%d",(a&b));
printf("\n b|a :%d",(a|b));
printf("\n a<<1 :%d",(a<<1));
printf("\n a>>1 :%d",(a>>1));
printf("\n ~a :%d",(~a));
getch();
}

No comments:

Post a Comment