SlideShare a Scribd company logo
Operators in COperators in C
 An operator is a symbol that causesAn operator is a symbol that causes
specific mathematical or logicalspecific mathematical or logical
manipulations to be performed.manipulations to be performed.
 An operator is a function which is appliedAn operator is a function which is applied
to operands to obtain a resultto operands to obtain a result
 c = a + b
Plus Operator
which will Produce
addition of A and
B
C OperatorsC Operators

Assignment OperatorAssignment Operator

Arithmetic OperatorsArithmetic Operators

Compound assignment operatorsCompound assignment operators

Relational / Comparison OperatorsRelational / Comparison Operators

Increment & Decrement OperatorsIncrement & Decrement Operators

Logical OperatorsLogical Operators

Special OperatorsSpecial Operators

Pointer OperatorsPointer Operators
Operators CategoriesOperators Categories
 Assignment operatorAssignment operator

The “equal to” symbol (=) is called asThe “equal to” symbol (=) is called as
assignment operator. it is used to assignassignment operator. it is used to assign
a value to a variable.a value to a variable.

It assigns the value of the expression onIt assigns the value of the expression on
its right side to the variable on its leftits right side to the variable on its left
side.side.

a = 10;
C OperatorsC Operators
 Arithmetic OperatorsArithmetic Operators
• AdditionAddition c = a + bc = a + b
• SubtractionSubtraction c = a - bc = a - b
• MultiplicationMultiplication c = a * bc = a * b
• DivisionDivision c = a / bc = a / b
• RemainderRemainder c = a % bc = a % b
C OperatorsC Operators
 Relational (Comparison) OperatorsRelational (Comparison) Operators

The relational operators are used to test orThe relational operators are used to test or
compare the value between two operands.compare the value between two operands.

>> Greater thanGreater than

<< Less thanLess than

>=>= Greater than or equal toGreater than or equal to

<=<= Less than or equal toLess than or equal to

! =! = Not equal toNot equal to

== == EqualityEquality
C OperatorsC Operators
 Increment and decrement operatorsIncrement and decrement operators

++++ increases variable value by 1increases variable value by 1

---- decreases variable value by 1decreases variable value by 1

SyntaxSyntax
a++; //increase ‘a’ by 1//increase ‘a’ by 1
a--; //decrease ‘a’ by 1//decrease ‘a’ by 1
C OperatorsC Operators
 Logical operatorsLogical operators

Logical operators are used to combineLogical operators are used to combine
two or more relations. The logicaltwo or more relations. The logical
operators are called Boolean operatorsoperators are called Boolean operators
because the tests between values arebecause the tests between values are
reduced to either true or false.reduced to either true or false.

OperatorOperator DescriptionDescription
• &&&& ANDAND
• |||| OROR
• !! NOTNOT
C OperatorsC Operators

More Related Content

PPT
Operators in c language
PDF
Operators in c programming
PPTX
Operator in c programming
PPTX
Operators in C/C++
PPT
Operators in C Programming
PPTX
Operators and expressions
PPT
Operators in C++
PPT
C operator and expression
Operators in c language
Operators in c programming
Operator in c programming
Operators in C/C++
Operators in C Programming
Operators and expressions
Operators in C++
C operator and expression

What's hot (20)

PPTX
Algorithm and flowchart
PPTX
Operators and expressions in C++
PPTX
Operators in java presentation
PPT
Js ppt
PPSX
Algorithm and flowchart
PPTX
Cascading Style Sheet (CSS)
PPTX
Introduction to programming
PDF
1 simulacro mision-tic (1)
PPTX
Compiler vs interpreter
PPTX
Programming Fundamentals lecture 1
PPTX
Operator.ppt
PPTX
Operators in C Programming
PPTX
Graphical User Interface
PPT
Computer architecture
PPTX
Introduction to Python Basics Programming
PDF
Introduction to oops concepts
PPTX
Variables in C++, data types in c++
PPTX
Functions in python
PPTX
Data types in python
Algorithm and flowchart
Operators and expressions in C++
Operators in java presentation
Js ppt
Algorithm and flowchart
Cascading Style Sheet (CSS)
Introduction to programming
1 simulacro mision-tic (1)
Compiler vs interpreter
Programming Fundamentals lecture 1
Operator.ppt
Operators in C Programming
Graphical User Interface
Computer architecture
Introduction to Python Basics Programming
Introduction to oops concepts
Variables in C++, data types in c++
Functions in python
Data types in python
Ad

Viewers also liked (14)

PDF
R171 杉田明宏・いとうたけひこ・井上孝代 (2013). アニメ『みんながHappyになる方法』による平和学習:平和博物館における活用を展望して トラ...
PDF
The Lady Formal-final
DOCX
LCT_ Amalraj_CV_MAY_2016
PPTX
4.4 Final Draft PPP
PDF
AdditionalInformationAnaddendumtotheFlier
PPTX
DOCX
Eng. Saleh Alamoush Activities
PDF
Quang Do's cv
DOCX
David Torry 2016 Resume2
PDF
R109 小平朋江・伊藤武彦 (2008). 精神障害の闘病記:多様な物語りの意義 マクロ・カウンセリング研究, 7, 48-63.
PDF
Funcionamento
PPTX
Selva tropical (2)
PDF
R062 井上孝代・伊藤武彦 (1997). 異文化間カウンセリングにおけるPAC分析技法 井上孝代(編) 異文化間臨床心理学序説 多賀出版(第4章(pp...
ODP
Amortizacion
R171 杉田明宏・いとうたけひこ・井上孝代 (2013). アニメ『みんながHappyになる方法』による平和学習:平和博物館における活用を展望して トラ...
The Lady Formal-final
LCT_ Amalraj_CV_MAY_2016
4.4 Final Draft PPP
AdditionalInformationAnaddendumtotheFlier
Eng. Saleh Alamoush Activities
Quang Do's cv
David Torry 2016 Resume2
R109 小平朋江・伊藤武彦 (2008). 精神障害の闘病記:多様な物語りの意義 マクロ・カウンセリング研究, 7, 48-63.
Funcionamento
Selva tropical (2)
R062 井上孝代・伊藤武彦 (1997). 異文化間カウンセリングにおけるPAC分析技法 井上孝代(編) 異文化間臨床心理学序説 多賀出版(第4章(pp...
Amortizacion
Ad

Similar to 2. operators in c (20)

PPTX
Csc240 -lecture_5
DOCX
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
PPTX
Opreator In "C"
PPTX
Computer programming 2 Lesson 7
PPTX
C Operators and Control Structures.pptx
PPTX
C sharp part 001
PDF
C Operators and Control Structures.pdf
PPT
operator ppt.ppt
PPTX
operators.pptx
PPTX
operator (1).pptx
PDF
C# Fundamentals - Basics of OOPS - Part 2
PPTX
Operators and it's type
PPTX
Operators in Python
PPT
Operator precedence and associativity
PPT
Operator precedence and associativity
PPTX
Operators in c-1.pptxOperators in c-1.pptx
DOCX
Programming Fundamentals lecture 7
PPTX
C operators
Csc240 -lecture_5
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
Opreator In "C"
Computer programming 2 Lesson 7
C Operators and Control Structures.pptx
C sharp part 001
C Operators and Control Structures.pdf
operator ppt.ppt
operators.pptx
operator (1).pptx
C# Fundamentals - Basics of OOPS - Part 2
Operators and it's type
Operators in Python
Operator precedence and associativity
Operator precedence and associativity
Operators in c-1.pptxOperators in c-1.pptx
Programming Fundamentals lecture 7
C operators

Recently uploaded (20)

PPTX
Sustainable Sites - Green Building Construction
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
additive manufacturing of ss316l using mig welding
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
web development for engineering and engineering
PDF
Digital Logic Computer Design lecture notes
PPT
Mechanical Engineering MATERIALS Selection
Sustainable Sites - Green Building Construction
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
CH1 Production IntroductoryConcepts.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Foundation to blockchain - A guide to Blockchain Tech
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
additive manufacturing of ss316l using mig welding
Automation-in-Manufacturing-Chapter-Introduction.pdf
bas. eng. economics group 4 presentation 1.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
UNIT 4 Total Quality Management .pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Embodied AI: Ushering in the Next Era of Intelligent Systems
web development for engineering and engineering
Digital Logic Computer Design lecture notes
Mechanical Engineering MATERIALS Selection

2. operators in c

  • 2.  An operator is a symbol that causesAn operator is a symbol that causes specific mathematical or logicalspecific mathematical or logical manipulations to be performed.manipulations to be performed.  An operator is a function which is appliedAn operator is a function which is applied to operands to obtain a resultto operands to obtain a result  c = a + b Plus Operator which will Produce addition of A and B C OperatorsC Operators
  • 3.  Assignment OperatorAssignment Operator  Arithmetic OperatorsArithmetic Operators  Compound assignment operatorsCompound assignment operators  Relational / Comparison OperatorsRelational / Comparison Operators  Increment & Decrement OperatorsIncrement & Decrement Operators  Logical OperatorsLogical Operators  Special OperatorsSpecial Operators  Pointer OperatorsPointer Operators Operators CategoriesOperators Categories
  • 4.  Assignment operatorAssignment operator  The “equal to” symbol (=) is called asThe “equal to” symbol (=) is called as assignment operator. it is used to assignassignment operator. it is used to assign a value to a variable.a value to a variable.  It assigns the value of the expression onIt assigns the value of the expression on its right side to the variable on its leftits right side to the variable on its left side.side.  a = 10; C OperatorsC Operators
  • 5.  Arithmetic OperatorsArithmetic Operators • AdditionAddition c = a + bc = a + b • SubtractionSubtraction c = a - bc = a - b • MultiplicationMultiplication c = a * bc = a * b • DivisionDivision c = a / bc = a / b • RemainderRemainder c = a % bc = a % b C OperatorsC Operators
  • 6.  Relational (Comparison) OperatorsRelational (Comparison) Operators  The relational operators are used to test orThe relational operators are used to test or compare the value between two operands.compare the value between two operands.  >> Greater thanGreater than  << Less thanLess than  >=>= Greater than or equal toGreater than or equal to  <=<= Less than or equal toLess than or equal to  ! =! = Not equal toNot equal to  == == EqualityEquality C OperatorsC Operators
  • 7.  Increment and decrement operatorsIncrement and decrement operators  ++++ increases variable value by 1increases variable value by 1  ---- decreases variable value by 1decreases variable value by 1  SyntaxSyntax a++; //increase ‘a’ by 1//increase ‘a’ by 1 a--; //decrease ‘a’ by 1//decrease ‘a’ by 1 C OperatorsC Operators
  • 8.  Logical operatorsLogical operators  Logical operators are used to combineLogical operators are used to combine two or more relations. The logicaltwo or more relations. The logical operators are called Boolean operatorsoperators are called Boolean operators because the tests between values arebecause the tests between values are reduced to either true or false.reduced to either true or false.  OperatorOperator DescriptionDescription • &&&& ANDAND • |||| OROR • !! NOTNOT C OperatorsC Operators