English, asked by Pinkya, 1 year ago

Discuss the significance of BITWISE operators in C (10 Marks)
programming language. Also, write an interactive C program to
illustrate them

Answers

Answered by rahul1232
2


#include
main( )
{
unsigned int a=60;
unsigned int b=13;
int c=0;

c=a&b;
printf("Q1-value of c is %d\n",c);

c= a|b;
printf("Q2- value of c is %d\n",c);

c= a^b;
printf("Q3-value of c is %d\n",c);

c=~a;
printf("Q4-value of c is %d\n",c);

c=a<<2;
printf("Q4-value of c is %d\n",c);

c=a>>2;
printf("Q5- value of c is %d \n",c);
}

when we compile and execute the above program it produces the following result:
Q1- value of c is 12.
Q2- value of c is 61.
Q3- value of c is 49.
Q4- value of c is 61.
Q5- value of c is 240.
Q6- value of c is 15.
Attachments:

rahul1232: please mark as the brainliest answer
Similar questions