+ 1

C operations

Please guys help me to figure out the use of these two operations: ^= |= https://code.sololearn.com/cAUBF3cAdLt6/?ref=app

30th Oct 2022, 8:47 PM
Kawtar
Kawtar - avatar
4 Antworten
+ 3
110 = 6 011 = 3 111 = 7 after bitwise OR of prevous both.
30th Oct 2022, 10:12 PM
JaScript
JaScript - avatar
+ 3
You may search for "bitwise operation in C". Have you tried yet?
30th Oct 2022, 8:53 PM
Lisa
Lisa - avatar
+ 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.
30th Oct 2022, 9:07 PM
Jayakrishna 🇮🇳
+ 1
Yea i know , but in this example what it does exactly
30th Oct 2022, 9:35 PM
Kawtar
Kawtar - avatar