GET EDUCATE

Contents
Basics of C Programming

⯈Basic C Programs

Relational operators in C

The following are the relational operators in C.

> ,<, >=, <=

The relational operators give answer in the form of true or false only.

true is represented by 1, and false by 0. It doesn’t mean that only 1 is true. 

Before we discuss the relational operators let us understand the true and false values in C.

True and False in C

In C Programming language, only 0 is false, other than 0 everything is true.

Ex

  1. “RAM” is True
  2. 1 is True.
  3. ‘A’ is True.
  4. -25 is True.
  5. 0.25 is True.
  6. 0 is False.

Relational operators

  • 45>23 = 1 (since it is true, and it is represented by 1)
  • 45<23 = 0 (since it is false, and it is represented by 0)
  • 20>=20 = 1 (since it is true, and it is represented by 1)
  • 23<=87 = 0 (since it is false, and it is represented by 0) 
Scroll to Top