+ 1
Find it
#include <stdio.h> int main() { int null=NULL; if(null=0) { printf("Hello\n"); } else { printf("World\n"); } } Option: A) Hello B) World C) No output D) error
2 Réponses
+ 6
It will print "World". null=0 is assignment, not equality check (that would be null==0). null=0 assigns 0 to "null" and returns 0. 0 = false => else branch is executed
0
First obeject isn't correct because (null==0) ; =false; the second condition is automatically execute
Ans will be World.