[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
!=                       Inequality operator (Not Equal)

 exp1 != exp2            Test for exp1 not equal to exp2
 exp1, exp2              any expression of type int, float, char, enum,
                         or related type

    != is a relational operator, yielding a value of 1 (TRUE) if exp1 has
    a different value than exp2; or 0 (FALSE) if exp1 has the same value
    as exp2.  Type conversion is performed as necessary before comparing
    the expressions, using the usual arithmetic conversions.  Example:

           if (number != guess)
               ...
           do  {
               ...
           } while (ans != 'n');

See Also: Conversions ==
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson