Inequality Comparison in C

Level 123 keystrokes

Compares if 5 is not equal to 3, returning 1 for true.

C code

// != is the inequality comparison operator
// Returns 1 if values are different, 0 if equal
1printf("%d\n", 5 != 3);

Output

1
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this C code and how often they appear.

  • "× 2
  • ,× 1
  • ;× 1
  • !× 1
  • (× 1
  • )× 1
  • \× 1
  • %× 1
  • =× 1

More C examples at level 1

← C typing practice