why is the operands in the if statement when not equal evaluates to true...
i thought that it should be evaluated to false. when it is not equal
The value within the condition braces shud evaluate to a boolean 1 to continue. That is irrespective of what you use within the conditions
Actually the expression should evaluate to a non-zero value for the if block to be executed. Otherwise the else block, if any, is executed. Non-zero does not necessarily mean 1: 2, -5, etc... will do.