Google News
logo
Relational Operators In C Language
Relational Operators are used to find the relation between two variables, and also used to compare arithmetic, logical and character expressions. The value of a relational expression is either one or zero, if the result is one, then the specified relation is true or if the result is zero then the specified relation is false.
  Example :
10 < 20 is true 

20 < 10 is false
Operator Meaning
< is less than
<= is less than or equal to
> is greater than
>= is greater than or equal
== is equal to
!= is not equal to
  Program : A program to illustrate the use of Relational Operators
#include<stdio.h>
#include<conio.h>
int main(){
	int m=40,n=20;
	if(m==n){
	printf(“m & n are equal”);
   }
else{
	printf(“m & n are not equal”);
    }
}
Output :

m & n are not equal