0

What does that mean... ??

Hi, I have never seen this code before and I can't find in in the courses... :( (Example) int x = !(1&&(0||1)); What does that mean?? Please help me, thank you!

23rd Jun 2017, 1:39 PM
ZAIMON
ZAIMON - avatar
2 Answers
+ 1
! means not, && is and, || is or. 1 is true and 0 is false. The expression says not(True and True), which evaluates to not(True), which is False. You're trying to assign the boolean False to an integer x, so you get a SyntaxError. Also, the operators && and || don't work for int types, so there's another error.
23rd Jun 2017, 1:42 PM
Frederik Bussler
Frederik Bussler - avatar
0
ok thanks :)
23rd Jun 2017, 3:10 PM
ZAIMON
ZAIMON - avatar