際際滷

際際滷Share a Scribd company logo
Relational operators
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

More Related Content

What's hot (20)

Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
programming9
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
tanmaymodi4
Function in C program
Function in C programFunction in C program
Function in C program
Nurul Zakiah Zamri Tan
Important features of java
Important features of javaImportant features of java
Important features of java
AL- AMIN
[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member
Muhammad Hammad Waseem
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
lavanya marichamy
Operators in C++
Operators in C++Operators in C++
Operators in C++
Sachin Sharma
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
Iqra khalil
Queue ppt
Queue pptQueue ppt
Queue ppt
SouravKumar328
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
Mahender Boda
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
Jeya Lakshmi
Structure in C
Structure in CStructure in C
Structure in C
Kamal Acharya
C if else
C if elseC if else
C if else
Ritwik Das
User defined functions in C
User defined functions in CUser defined functions in C
User defined functions in C
Harendra Singh
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
Shuvongkor Barman
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
Md. Imran Hossain Showrov
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
Paras Patel
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
v_jk
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
Angela DeHart
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
programming9
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
tanmaymodi4
Important features of java
Important features of javaImportant features of java
Important features of java
AL- AMIN
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
lavanya marichamy
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
Iqra khalil
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
Jeya Lakshmi
User defined functions in C
User defined functions in CUser defined functions in C
User defined functions in C
Harendra Singh
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
Shuvongkor Barman
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
Md. Imran Hossain Showrov
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
Paras Patel
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
v_jk
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
Angela DeHart

Similar to Relational operators (20)

Operators in java By cheena
Operators in java By cheenaOperators in java By cheena
Operators in java By cheena
Ch谷谷単奪 B奪b端
cprogrammingoperator.ppt
cprogrammingoperator.pptcprogrammingoperator.ppt
cprogrammingoperator.ppt
georgejustymirobi1
C operator and expression
C operator and expressionC operator and expression
C operator and expression
LavanyaManokaran
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptx
classall
Operators and Expressions
Operators and ExpressionsOperators and Expressions
Operators and Expressions
Munazza-Mah-Jabeen
R operators
R   operatorsR   operators
R operators
Learnbay Datascience
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
teach4uin
Operators in c++
Operators in c++Operators in c++
Operators in c++
ABHIJITPATRA23
C Operators
C OperatorsC Operators
C Operators
Yash Modi
Python basic operators
Python   basic operatorsPython   basic operators
Python basic operators
Learnbay Datascience
Shubhrat operator &amp; expression
Shubhrat operator &amp; expressionShubhrat operator &amp; expression
Shubhrat operator &amp; expression
Shubhrat Mishra
c programming2.pptx
c programming2.pptxc programming2.pptx
c programming2.pptx
YuvarajuCherukuri
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#
Simplilearn
C PRESENTATION.pptx
C PRESENTATION.pptxC PRESENTATION.pptx
C PRESENTATION.pptx
VAIBHAV175947
Python Lec-6 Operatorguijjjjuugggggs.pptx
Python Lec-6 Operatorguijjjjuugggggs.pptxPython Lec-6 Operatorguijjjjuugggggs.pptx
Python Lec-6 Operatorguijjjjuugggggs.pptx
ks812227
Data Types and Operators in Python2.pptx
Data Types and Operators in Python2.pptxData Types and Operators in Python2.pptx
Data Types and Operators in Python2.pptx
priyakanthr
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
Asheesh kushwaha
Opreator In "C"
Opreator In "C"Opreator In "C"
Opreator In "C"
Amlendu dubey
Operators
OperatorsOperators
Operators
jayesh30sikchi
Operators used in vb.net
Operators used in vb.netOperators used in vb.net
Operators used in vb.net
Jaya Kumari
C operator and expression
C operator and expressionC operator and expression
C operator and expression
LavanyaManokaran
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptx
classall
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
teach4uin
C Operators
C OperatorsC Operators
C Operators
Yash Modi
Shubhrat operator &amp; expression
Shubhrat operator &amp; expressionShubhrat operator &amp; expression
Shubhrat operator &amp; expression
Shubhrat Mishra
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#
Simplilearn
C PRESENTATION.pptx
C PRESENTATION.pptxC PRESENTATION.pptx
C PRESENTATION.pptx
VAIBHAV175947
Python Lec-6 Operatorguijjjjuugggggs.pptx
Python Lec-6 Operatorguijjjjuugggggs.pptxPython Lec-6 Operatorguijjjjuugggggs.pptx
Python Lec-6 Operatorguijjjjuugggggs.pptx
ks812227
Data Types and Operators in Python2.pptx
Data Types and Operators in Python2.pptxData Types and Operators in Python2.pptx
Data Types and Operators in Python2.pptx
priyakanthr
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
Asheesh kushwaha
Operators used in vb.net
Operators used in vb.netOperators used in vb.net
Operators used in vb.net
Jaya Kumari

Recently uploaded (20)

Principle and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby BasnetPrinciple and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby Basnet
Boby Basnet
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Ajaz Hussain
Database population in Odoo 18 - Odoo slides
Database population in Odoo 18 - Odoo slidesDatabase population in Odoo 18 - Odoo slides
Database population in Odoo 18 - Odoo slides
Celine George
Modeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptxModeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptx
maribethlacno2
FESTIVAL: SINULOG & THINGYAN-LESSON 4.pptx
FESTIVAL: SINULOG & THINGYAN-LESSON 4.pptxFESTIVAL: SINULOG & THINGYAN-LESSON 4.pptx
FESTIVAL: SINULOG & THINGYAN-LESSON 4.pptx
DanmarieMuli1
Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025
Conquiztadors- the Quiz Society of Sri Venkateswara College
Computer Network Unit IV - Lecture Notes - Network Layer
Computer Network Unit IV - Lecture Notes - Network LayerComputer Network Unit IV - Lecture Notes - Network Layer
Computer Network Unit IV - Lecture Notes - Network Layer
Murugan146644
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
Association for Project Management
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir DotanThe Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
History of Stoke Newington
Reordering Rules in Odoo 17 Inventory - Odoo 際際滷s
Reordering Rules in Odoo 17 Inventory - Odoo 際際滷sReordering Rules in Odoo 17 Inventory - Odoo 際際滷s
Reordering Rules in Odoo 17 Inventory - Odoo 際際滷s
Celine George
Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025
Conquiztadors- the Quiz Society of Sri Venkateswara College
QuickBooks Desktop to QuickBooks Online How to Make the Move
QuickBooks Desktop to QuickBooks Online  How to Make the MoveQuickBooks Desktop to QuickBooks Online  How to Make the Move
QuickBooks Desktop to QuickBooks Online How to Make the Move
TechSoup
APM People Interest Network Conference - Tim Lyons - The neurological levels ...
APM People Interest Network Conference - Tim Lyons - The neurological levels ...APM People Interest Network Conference - Tim Lyons - The neurological levels ...
APM People Interest Network Conference - Tim Lyons - The neurological levels ...
Association for Project Management
English 4 Quarter 4 Week 4 Classroom Obs
English 4 Quarter 4 Week 4 Classroom ObsEnglish 4 Quarter 4 Week 4 Classroom Obs
English 4 Quarter 4 Week 4 Classroom Obs
NerissaMendez1
How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18
Celine George
Kaun TALHA quiz Prelims - El Dorado 2025
Kaun TALHA quiz Prelims - El Dorado 2025Kaun TALHA quiz Prelims - El Dorado 2025
Kaun TALHA quiz Prelims - El Dorado 2025
Conquiztadors- the Quiz Society of Sri Venkateswara College
How to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 InventoryHow to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 Inventory
Celine George
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
pinkdvil200
A PPT Presentation on The Princess and the God: A tale of ancient India by A...
A PPT Presentation on The Princess and the God: A tale of ancient India  by A...A PPT Presentation on The Princess and the God: A tale of ancient India  by A...
A PPT Presentation on The Princess and the God: A tale of ancient India by A...
Beena E S
Principle and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby BasnetPrinciple and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby Basnet
Boby Basnet
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Ajaz Hussain
Database population in Odoo 18 - Odoo slides
Database population in Odoo 18 - Odoo slidesDatabase population in Odoo 18 - Odoo slides
Database population in Odoo 18 - Odoo slides
Celine George
Modeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptxModeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptx
maribethlacno2
FESTIVAL: SINULOG & THINGYAN-LESSON 4.pptx
FESTIVAL: SINULOG & THINGYAN-LESSON 4.pptxFESTIVAL: SINULOG & THINGYAN-LESSON 4.pptx
FESTIVAL: SINULOG & THINGYAN-LESSON 4.pptx
DanmarieMuli1
Computer Network Unit IV - Lecture Notes - Network Layer
Computer Network Unit IV - Lecture Notes - Network LayerComputer Network Unit IV - Lecture Notes - Network Layer
Computer Network Unit IV - Lecture Notes - Network Layer
Murugan146644
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
APM People Interest Network Conference - Oliver Randall & David Bovis - Own Y...
Association for Project Management
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir DotanThe Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
The Battle of Belgrade Road: A WW1 Street Renaming Saga by Amir Dotan
History of Stoke Newington
Reordering Rules in Odoo 17 Inventory - Odoo 際際滷s
Reordering Rules in Odoo 17 Inventory - Odoo 際際滷sReordering Rules in Odoo 17 Inventory - Odoo 際際滷s
Reordering Rules in Odoo 17 Inventory - Odoo 際際滷s
Celine George
QuickBooks Desktop to QuickBooks Online How to Make the Move
QuickBooks Desktop to QuickBooks Online  How to Make the MoveQuickBooks Desktop to QuickBooks Online  How to Make the Move
QuickBooks Desktop to QuickBooks Online How to Make the Move
TechSoup
APM People Interest Network Conference - Tim Lyons - The neurological levels ...
APM People Interest Network Conference - Tim Lyons - The neurological levels ...APM People Interest Network Conference - Tim Lyons - The neurological levels ...
APM People Interest Network Conference - Tim Lyons - The neurological levels ...
Association for Project Management
English 4 Quarter 4 Week 4 Classroom Obs
English 4 Quarter 4 Week 4 Classroom ObsEnglish 4 Quarter 4 Week 4 Classroom Obs
English 4 Quarter 4 Week 4 Classroom Obs
NerissaMendez1
How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18How to Modify Existing Web Pages in Odoo 18
How to Modify Existing Web Pages in Odoo 18
Celine George
How to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 InventoryHow to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 Inventory
Celine George
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
pinkdvil200
A PPT Presentation on The Princess and the God: A tale of ancient India by A...
A PPT Presentation on The Princess and the God: A tale of ancient India  by A...A PPT Presentation on The Princess and the God: A tale of ancient India  by A...
A PPT Presentation on The Princess and the God: A tale of ancient India by A...
Beena E S

Relational operators

  • 2. 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:-
  • 3. 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
  • 4. 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 .
  • 5. 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 (=).
  • 6. The following table shows all the relational operators supported by C language. Assume variable A holds 10 and variable B holds 20 then