SlideShare a Scribd company logo
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

Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
avikdhupar
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
Ahmad Idrees
 
Data types
Data typesData types
Data types
Nokesh Prabhakar
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
Neeru Mittal
 
Data types
Data typesData types
Data types
Zahid Hussain
 
Structures in c language
Structures in c languageStructures in c language
Structures in c language
tanmaymodi4
 
C++ Overview PPT
C++ Overview PPTC++ Overview PPT
C++ Overview PPT
Thooyavan Venkatachalam
 
Constant, variables, data types
Constant, variables, data typesConstant, variables, data types
Constant, variables, data types
Pratik Devmurari
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
Way2itech
 
Loops and conditional statements
Loops and conditional statementsLoops and conditional statements
Loops and conditional statements
Saad Sheikh
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
programming9
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
satvirsandhu9
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C Programming
Kamal Acharya
 
Type Conversion, Precedence and Associativity
Type Conversion, Precedence and AssociativityType Conversion, Precedence and Associativity
Type Conversion, Precedence and Associativity
Aakash Singh
 
Conditional Statement in C Language
Conditional Statement in C LanguageConditional Statement in C Language
Conditional Statement in C Language
Shaina Arora
 
Header files in c
Header files in cHeader files in c
Header files in c
HoneyChintal
 
Pointers in C Programming
Pointers in C ProgrammingPointers in C Programming
Pointers in C Programming
Jasleen Kaur (Chandigarh University)
 
Operators in java presentation
Operators in java presentationOperators in java presentation
Operators in java presentation
kunal kishore
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
Smriti Jain
 
C tokens
C tokensC tokens
C tokens
Manu1325
 

What's hot (20)

Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
Data types
Data typesData types
Data types
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
 
Data types
Data typesData types
Data types
 
Structures in c language
Structures in c languageStructures in c language
Structures in c language
 
C++ Overview PPT
C++ Overview PPTC++ Overview PPT
C++ Overview PPT
 
Constant, variables, data types
Constant, variables, data typesConstant, variables, data types
Constant, variables, data types
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
 
Loops and conditional statements
Loops and conditional statementsLoops and conditional statements
Loops and conditional statements
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C Programming
 
Type Conversion, Precedence and Associativity
Type Conversion, Precedence and AssociativityType Conversion, Precedence and Associativity
Type Conversion, Precedence and Associativity
 
Conditional Statement in C Language
Conditional Statement in C LanguageConditional Statement in C Language
Conditional Statement in C Language
 
Header files in c
Header files in cHeader files in c
Header files in c
 
Pointers in C Programming
Pointers in C ProgrammingPointers in C Programming
Pointers in C Programming
 
Operators in java presentation
Operators in java presentationOperators in java presentation
Operators in java presentation
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
C tokens
C tokensC tokens
C tokens
 

Similar to Relational operators

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
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
 
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
 
Guide to Java.pptx
Guide to Java.pptxGuide to Java.pptx
Guide to Java.pptx
PrathamVaishnav1
 
operators in c++
operators in c++operators in c++
operators in c++
Kartik Fulara
 

Similar to Relational operators (20)

Operators in java By cheena
Operators in java By cheenaOperators in java By cheena
Operators in java By cheena
 
cprogrammingoperator.ppt
cprogrammingoperator.pptcprogrammingoperator.ppt
cprogrammingoperator.ppt
 
C operator and expression
C operator and expressionC operator and expression
C operator and expression
 
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptx
 
Operators and Expressions
Operators and ExpressionsOperators and Expressions
Operators and Expressions
 
R operators
R   operatorsR   operators
R operators
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
 
Operators in c++
Operators in c++Operators in c++
Operators in c++
 
C Operators
C OperatorsC Operators
C Operators
 
Python basic operators
Python   basic operatorsPython   basic operators
Python basic operators
 
Shubhrat operator &amp; expression
Shubhrat operator &amp; expressionShubhrat operator &amp; expression
Shubhrat operator &amp; expression
 
c programming2.pptx
c programming2.pptxc programming2.pptx
c programming2.pptx
 
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#
 
C PRESENTATION.pptx
C PRESENTATION.pptxC PRESENTATION.pptx
C PRESENTATION.pptx
 
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
 
Opreator In "C"
Opreator In "C"Opreator In "C"
Opreator In "C"
 
Operators
OperatorsOperators
Operators
 
Operators used in vb.net
Operators used in vb.netOperators used in vb.net
Operators used in vb.net
 
Guide to Java.pptx
Guide to Java.pptxGuide to Java.pptx
Guide to Java.pptx
 
operators in c++
operators in c++operators in c++
operators in c++
 

Recently uploaded

How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 

Recently uploaded (20)

How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 

Relational operators

  • 1.
  • 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 −