ProAnswers.org

Write a C program to use bitwise AND operator between the two integers and display the results?.

 #include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr();

printf(“Read the integer from keyboard(a&b):”);

scanf(“%d%d”, &a, &b);

c=a&b;

printf(“The answer after AND operation is (c)=%d”, c);

getch();

}

Output:

Read the integer from keyboard(a&b): 8 4

The answer after AND operation is (c)=0