Operators
An operators specifies an operation to be
performed that yields a value. The variables,
constant can be joined by various operators to
form an expression. An operands is a data item
on which an operator acts. Some operators
require two operands, while other act upon
only one operands. C include a large number
of operators that fall several different
categories, which are as:-
1.Arithmetic Operators
2.Assignment Operators
3.Increment and Decrement Operators
4.Relational Operators
5.Logical Operators
6.Conditional operators
7.Comma Operators
8.sizeof operators
9.Bitwise Operators
Relational Operators
Relational Operators are used to compare values of two
expressions depending on their relation. An expression that
contains relational operators is called relational expression. If the
relation is true then the value of relational expression is 1 and if
the relation is false then the value of expression is 0.The
relational operators are:-
< less than
> greater than
<= less than or equal to
>= greater than or equal to
== is equal to
!= is not equal to
.
• Relational expressions evaluate to the integer
values 1 (true) or 0 (false).
• All of these operators are called binary operators
because they take two expressions as operands
• Relational operator (==) is used to compare 2
values whether they are equal are not.
• If both values are equal, output is displayed as ”
values are equal”. Else, output is displayed as
“values are not equal”.
• Note : double equal sign (==) should be used to
compare 2 values. We should not use single equal
sign (=).
• The following table shows all the relational operators supported by C
language. Assume variable A holds 10 and variable B holds 20 then −
Relational operators

Relational operators

  • 2.
    Operators An operators specifiesan operation to be performed that yields a value. The variables, constant can be joined by various operators to form an expression. An operands is a data item on which an operator acts. Some operators require two operands, while other act upon only one operands. C include a large number of operators that fall several different categories, which are as:-
  • 3.
    1.Arithmetic Operators 2.Assignment Operators 3.Incrementand Decrement Operators 4.Relational Operators 5.Logical Operators 6.Conditional operators 7.Comma Operators 8.sizeof operators 9.Bitwise Operators
  • 4.
    Relational Operators Relational Operatorsare used to compare values of two expressions depending on their relation. An expression that contains relational operators is called relational expression. If the relation is true then the value of relational expression is 1 and if the relation is false then the value of expression is 0.The relational operators are:- < less than > greater than <= less than or equal to >= greater than or equal to == is equal to != is not equal to .
  • 5.
    • Relational expressionsevaluate to the integer values 1 (true) or 0 (false). • All of these operators are called binary operators because they take two expressions as operands • Relational operator (==) is used to compare 2 values whether they are equal are not. • If both values are equal, output is displayed as ” values are equal”. Else, output is displayed as “values are not equal”. • Note : double equal sign (==) should be used to compare 2 values. We should not use single equal sign (=).
  • 6.
    • The followingtable shows all the relational operators supported by C language. Assume variable A holds 10 and variable B holds 20 then −