what does ^= do in C programming? like i saw in a code that calls a function that executes a round of a game, they put player ^= player up with the rest of the initialization and naming. can someone help? thanks.
what does ^= do in C programming? like i saw in a code that calls a function that executes a round of a game, they put player ^= player up with the rest of the initialization and naming. can someone help? thanks.
It's the exclusive-OR assignment operator, the effect is the same as:
Conveniently enough, I just posted something about the bit operators here.Code:a = a ^ b;
My best code is written with the delete key.