2. Bit Toggle

Back To All Submissions
Previous Submission
Next Submission

Code

#include <stdio.h>

int bit_toggle(int n) { return n ^= (1 << 5); }

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

Solving Approach

 

 

 

Was this helpful?
Upvote
Downvote