#include <stdio.h> int toggleFifthBit(int n) { // Write your code here return n^0x20; //n^32 in decimal 32 in bin is 100000, any bit xor'd with one will toggle it. } int main() { int n; scanf("%d", &n); printf("%d", toggleFifthBit(n)); return 0; }
Test Cases
Test Results
Input
8
Expected Output
40