In C, the symbol '=' means 'assign'. but in the selection structure, the '==' means check whether the condition is true, eg.
but if you write the statement in this way:Code:if (i == 2)
the check statement still works sometimes, my question is that why the '=' symbol in the check statement works, did the equality returns some value? and how the '==' works? Thanks!Code:if (i = 2)



LinkBack URL
About LinkBacks


