$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #289

What goes in the blank?

# flip bit k of x
x = x ____ (1 << k)

Answer: ^ (also accepted: ^)

XOR with a one-bit mask toggles exactly that bit and leaves the rest unchanged.
Play Problem Solving ▸