#include <stdio.h>
int main() {
int num = 10;
printf("Original number: %d\n", num);
// Set the 3rd bit
num = num | (1 << 2);
printf("After setting the 3rd bit: %d\n", num);
// Clear the 2nd bit
num = num & ~(1 << 1);
printf("After clearing the 2nd bit: %d\n", num);
// Toggle the 1st bit
num = num ^ (1 << 0);
printf("After toggling the 1st bit: %d\n", num);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: