All submissions

Code

#include <stdio.h>
#define bit 5

int toggleFifthBit(int n) {
    // Write your code here
    int temp;
    temp =n ^ (1<<bit);
    return temp;

}

int main() {
    int n;
    scanf("%d", &n);
    printf("%d", toggleFifthBit(n));
    return 0;
}

Solving Approach

 

 

 

Loading...

Input

8

Expected Output

40