C Programming by EezyTutorials
Home iOS
Tutorials
HTML CSS C++ Java Python C Programming SQL TypeScript Go Machine Learning React Redux
Tools
  • C Programming
  • C - Introduction
  • C - Hello World
  • C - Statements
  • C - Statement Blocks
  • C - Tokens
  • C - Identifiers
  • C - Keywords
  • C - Comments
  • C - Literals
  • C - Variables
  • C - Constants
  • C - Datatypes
  • C - Type Casting
  • C - Standard Input Output
  • C - Formatting Printf
  • C - Functions
  • C - Conditional Statements
  • C - If Statement
  • C - If Else Statement
  • C - Else If Ladder
  • C - Switch Statement
  • Loops
    • C - Looping Statements
    • C - For Loop
    • C - While Loop
    • C - Do-While Loop
    • C - Break Statement
    • C - Continue Statement
    • C - Go to Statement
  • Operators
    • C - Operators
    • C - Arithmetic Operators
    • C - Logical Operators
    • C - Relational Operators
    • C - Bitwise Operators
    • C - Assignment Operators
    • C - Ternary Operator
    • C - Operators Precedence
  • Structures & Types
    • C - Structures
    • C - Arrays of structures
    • C - Nested Structures
    • C - Unions
    • C - Enum
    • C - Typedef
  • C - String Manipulation
  • Pointers
    • C - Pointers
    • C - Address-of operator
    • C - Dereference operator
    • C - Pointer arithmetic
    • C - Pointing to functions
    • C - Passing pointers to functions
    • C - Pointing to Structures
  • Arrays
    • C - Arrays
    • C - Multi-Dimensional Arrays
    • C - Passing arrays to functions
  • C - Scope and Storage Classes
  • C - Command Line Arguments
  • C - Variable Arguments
  • C - Bit Fields
  • C - File Input Output
  • C - Preprocessor
  • C - Recursive Functions
  • File I/O
    • C - File Input Output
    • C - Simple File Handling
    • C - Advanced File Handling
  • C - Math Functions
  • C - Memory Handling
  • C - Error Handling

C - Relational Operators

On this page
    Back to top ↑

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

    Operators

    • ==, !=
    • <, >, <=, >=

    Example

    #include <stdio.h>
    
    int main(void) {
      int a = 3, b = 5;
      printf("a < b = %d\n", a < b);
      printf("a == b = %d\n", a == b);
    }
    
    « Previous: C - Logical Operators | Next: C - Bitwise Operators »

    ★ EezyTutorials

    • ℹAbout
    • ✉Contact
    • 📢Advertise
    • 🔒Privacy Policy

    Connect

    🗨 🐦 ▶️
    © 2014–2025 Eezy Tutorials
    Up ↑