#include <stdio.h>
int toggleFifthBit(int n) {
// Write your code here
return n^(1<<5); // toggle the bit in 5t position
}
int main() {
int n;
scanf("%d", &n);
printf("%d", toggleFifthBit(n));
return 0;
}
Solving Approach
int toggleFifthBit(int n) {
// Write your code here
return n^(1<<5); // toggle the bit in 5t position
}