This repository has been archived on 2023-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
VSMechatronics/C6/ex2.c

15 lines
270 B
C
Raw Normal View History

2023-10-06 12:21:32 +00:00
#include <stdio.h>
int main() {
unsigned int a = 60;
unsigned int b = 13;
unsigned int r;
r = a & b;
printf("bitwise AND of 60 and 13: %d\n", r);
r = a | b;
printf("bitwise OR of 60 and 13: %d\n", r);
r = a ^ b;
printf("bitwise XOR of 60 and 13: %d\n", r);
}