+ 1
C operations
Please guys help me to figure out the use of these two operations: ^= |= https://code.sololearn.com/cAUBF3cAdLt6/?ref=app
4 odpowiedzi
+ 3
110 = 6
011 = 3
111 = 7 after bitwise OR of prevous both.
+ 3
You may search for "bitwise operation in C". Have you tried yet?
+ 1
c ^= 1 is equal to c = c^1
^ is bit wise exclusive operator.
c |= 1 is equal to c = c | 1
| is bit wise OR operator.
+ 1
Yea i know , but in this example what it does exactly