+ 3
Help is "=! " the same as " != " ??
#include<stdio.h> #include<stdlib.h> int main(){ int a=1; a=(a=!1); a=(a!=1); printf("%d",a); return 0; } // output: 1 intead of 0
4 Réponses
+ 7
"!=" is "not equal"
but "=!" is "assignment" and "not"
So a = (!1) would be 0
Your example gives me a warning for the line after int a=1
+ 5
Mik_RDC
a =!1 means a = !1 = 0
a != 1 means a is not equal to 1
don't think =! is a syntax, actually it is a = !1
+ 2
1) "=!" - you may gorget for a second about "=", becouse "!" will invert only 1 !!! thing after it (0 to 1 and 1 to 0). And only after inverting you can make an assignment with "="
2) "!=" also inverts, but the result, result of two things (variables, numbers, chars ...)
+ 1
I don't think so...
`!=` and `!==` means "not equal to..." and "strictly not equal to".
And I don't think that's even a syntax of a code...?