+ 1
Can someone explain me this code?[SOLVED]
Why is the output 1 and not 0 as we have the NOT operator (!) ? https://code.sololearn.com/chOPmOT8me1G/?ref=app
4 Answers
+ 2
Because "!b" is not modifying b
You should write b=!b;
+ 1
The command "!b;" just evaluates to false, but this result is not used by anything.
It's like writing "2+2;", it evaluets to 4 but that 4 is not used
So nothing changes
+ 1
Angelo Ohh yeahh you're right I understood it now. Thank youu!
0
Angelo true but then what changes with !b?



