Back to Course
Operators

Relational Operators in C Programming

What are Relational Operators?

Relational operators compare two values and return 1 (true) or 0 (false).

List of Relational Operators

  • == — equal to
  • != — not equal to
  • > — greater than
  • < — less than
  • >= — greater than or equal to
  • <= — less than or equal to
int a = 5, b = 8;
printf("%d", a < b);   // 1 (true)
printf("%d", a == b);  // 0 (false)

Relational expressions are widely used in conditional statements and loops.

Ready to master real-world C Programming development?

Learn C Programming hands-on with mentor-led, live sessions.

Explore Course