Monday, January 4, 2010

Program to use bitwise AND operator between the two integers.

#include
#include

void main()
{
int a,b,c;
clrscr();
printf("Read the integers from keyboard:- ");
scanf("%d %d",&a,&b);
c=a&b;
printf("\nThe Answer after ANDing is:  %d ",c);
getch();
}


Output:
Read the integers from keyboard:- 8 4
The Answer after ANDing is: 0


 

No comments:

Post a Comment