Practical C Programming, 3rd Edition

I l @ ve RuBoard

Answer 30-1: The statement (number =! 2) is not a relational equation, but an assignment statement. It is equivalent to:

number = (!2);

(Because 2 is nonzero, !2 is zero.)

The programmer accidently reversed the not equal !=, so it became =! . The statement should read:

if (number != 2)

I l @ ve RuBoard

Категории