Why is the output of this program 0? [closed]

False is printed as 0.

x!=5 is false, hence %d will print 0, if you do x==5, it will print 1.

http://codepad.org/t8DAMu3A

Leave a Comment