Programming, C, Interview, Programming Languages, Software Development.
Assume an integer pattern like 01110011. You need to toggle bits from 2 position to 5th position. So the pattern becomes 01101101. Can you achieve this with a single C statement? void toggle_bits(int n, int p, int q) where n is the 8 bit integer, p is the start position and q is the end position.