2. Bit Toggle

Back To All Submissions
Previous Submission
Next Submission

Code

#include <stdio.h>

int main() {
    int N;
    scanf("%d", &N);

    N ^= (1 << 5);   // Toggle bit 5

    printf("%d", N);
    return 0;
}

Solving Approach

 

 

 

Was this helpful?
Upvote
Downvote