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