22. WAP to understand bitwise operators.

 

#include<stdio.h>

void main()

{

    int i=10,j=15,k;

    k=i&j;

    printf("k=%d\n",k);

   

    k=i|j;

    printf("k=%d\n",k);

   

    k=i^j;

    printf("k=%d\n",k);

   

    k=~i;

    printf("k=%d\n",k);

}

Comments