Relational Operators
On this page (7sections)
Relational Operators
- It Compare two operands and depending upon the their relation.
Syntax
Op1 Operator Op2
Example :
a > b
There are six relational operators. They are,
- < less than
- > greater than
- <= less than or equal to
- >= greater than or equal to
- == equal to
- != not equal to
Example of Relational Operator Program
/* Example Program For Relational Operator In C Programming Language
little drops @ thiyagaraaj.com
Coded By:THIYAGARAAJ MP */
// Header Files
#include<stdio.h>
#include<conio.h>
//Main Function
int main()
{
// Variable Declaration
int a = 25, b = 5;
if( a>b )
printf (?A is Big?);
else
printf (?A and B are Equal or B is Big?);
// Wait For Output Screen
getch();
//Main Function return Statement
return 0;
}
Output
A is Big.
Related Pages
Continue learning with these related tutorials and programs:
- C Tutorials — Browse all C Tutorials.
- C Operators — Overview — all C operator categories.
- Arithmetic Operator Example Program In C — More in c operators.
- Logical Operators — More in c operators.