#include <stdio.h> int toggleFifthBit(int n) { // Write your code here int bit_pos = 5; int mask = 1 << bit_pos; return n ^ mask; } int main() { int n; int x =5; scanf("%d", &n); printf("%d", toggleFifthBit(n)); return 0; }
Test Cases
Test Results
Input
8
Expected Output
40