SlideShare a Scribd company logo
Click to edit Master title style
1
Operator in c
N a m e : S u b h r a s i s B i s wa l
R e g d . n o : 2 2 0 3 0 11 2 0 1 6 8
Click to edit Master title style
2
content:-
1.Operator
2.Types of operator:-
*Arithmetic operator
*Assignment operator
*Increment and decrement operator
*Relational operator
*Logical operator
*Conditional operator
*Bitwise operator
*Binary operator 2
Click to edit Master title style
3
Operator
C operator are one of the features in C which
has symbols that can be used to perform
mathematical, relational, bitwise, conditional
or logical manipulations.
The C programing language has a lot of built-
in operators to perform various tasks as per
the need of the program.
An operator in C is a symbol or a keyword that
performs a specific operation on one or more
operands.
3
Click to edit Master title style
4
Operator Description Example
+ Adds two
operands
a + b=30
- Subtracts
second
operand
from the first
a – b=10
* Multiplies
both
operands
a * b=200
/ Divides
numerator
by de
numerator
b/a=2
Arithmetic operator:-
An arithmetic operator performs
mathematical operations such as addition,
subtraction, multiplication, division etc. on
numerical values (constants and variables).
These operators can be used to perform
simple or complex calculations in various
programming languages and applications.
Click to edit Master title style
5
Assignment operator:-
 The assignment operator is a assigns
the value of its righthand operand to a
variable, a property, or an indexer
element given its left hand operand .
 The result of an assignment expression
is the value assigned to the left-hand
operand.
Operator Operation performed
%= Reminder assignment
+= Addition assignment
-= Subtraction assignment
<<= Left-shift assignment
Click to edit Master title style
6
Increment and decrement operators:-
 The increment operator increases the
value of the variable by one and the
decrement operator decreases the value
f the variable by one.
 The increment (++) and decrement (- -)
are important unary operators in c. unary
operators are those which are applied on
a single operand.
operator Expression Description
++ ++X Pre-increment
X++ Post-increment
-- --X Pre-decrement
X-- Post-decrement
Click to edit Master title style
7
Relational operator:-
 A relational operator checks the relationship
between two operands. If the relation is true, it
returns 1; if the relation is false, it returns
value 0. Relational operators are used in
decision making and loops.
Operator Meaning of
operator
Example
== Equal to 5==3 is
evaluated to 0
> Greater than 5>3 is
evaluated to 1
< Less than 5<3 is
evaluated to 0
!= Not equal to 5!=3 is
evaluated to 1
Click to edit Master title style
8
Logical operator :-
 We use logical operators to perform various
logical operations on any set of given
expression.
 We have three major logical operators in the c
language –Logical NOT(!),Logical OR(||) and
Logical AND (&&).
operator description Example
&& Called Logical AND
operator. If both the
operands are non-
zero, then the
condition becomes
true.
(A && B) is false
|| called Logical OR
Operator. If any of
the two operands is
non-zero, then the
condition becomes
true.
(A || B) is true
! Called Logical NOT
Operator. It is used
to reverse the
logical state of its
operand. If a
condition is true,
then Logical NOT
operator will make it
false.
! (A && B) is true
Click to edit Master title style
9
Conditional operator:-
 A conditional operator is a single
programming statement, while the ‘if-else’
statement is a programming block in which
statements come under the parenthesis.
 A conditional operator can also be used for
assigning a value to the variable, where as
the ‘if-else’ statement cannot be used for
the assignment purpose.
operation description Example
Equal to == If(a==0)
b=b+5;
Not equal to != If(a!=1)
b=b+4;
Click to edit Master title style
10
Bitwise operator:-
 The Bitwise Operator in C is a type of
operator that operates on bit arrays, bit
strings, and tweaking binary values with
individual bits at the bit level.
 It is mainly used in numerical
computations for a faster calculation
because it consists of two digits – 1 or 0.
operator description
& Bitwise AND
| Bitwise OR
~ One’s complement
<< Left sift
>> Right sift
^ Bitwise XOR
Click to edit Master title style
11
Binary operator:-
 A Binary operator is an operator that operates on two operands to produce a new
value .
 Most common binary operators are +, -, *, /, etc. Binary operators in C are further
divided into - Arithmetic Operators.
Click to edit Master title style
12

More Related Content

Similar to operator (1).pptx

c programming2.pptx
c programming2.pptxc programming2.pptx
c programming2.pptx
YuvarajuCherukuri
 
operator ppt.ppt
operator ppt.pptoperator ppt.ppt
operator ppt.ppt
MrSharadtechnical
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
Thesis Scientist Private Limited
 
Programming presentation
Programming presentationProgramming presentation
Programming presentation
Fiaz Khokhar
 
C basics
C basicsC basics
C basics
sridevi5983
 
C basics
C basicsC basics
C basics
sridevi5983
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till now
AmAn Singh
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till now
AmAn Singh
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
vishaljot_kaur
 
Programming Fundamentals lecture 7
Programming Fundamentals lecture 7Programming Fundamentals lecture 7
Programming Fundamentals lecture 7
REHAN IJAZ
 
What are operators?
What are operators? What are operators?
What are operators?
AnuragSrivastava272
 
Operators
OperatorsOperators
Operators
jayesh30sikchi
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
Kathirvel Ayyaswamy
 
Theory3
Theory3Theory3
Ch4 Expressions
Ch4 ExpressionsCh4 Expressions
Ch4 Expressions
SzeChingChen
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
Anusuya123
 
Basic c operators
Basic c operatorsBasic c operators
Basic c operators
dishti7
 
intro to differnt oper.pptx
intro to differnt oper.pptxintro to differnt oper.pptx
intro to differnt oper.pptx
ssuser5ad1571
 
Arithmetic and increment decrement Operator
Arithmetic and increment decrement OperatorArithmetic and increment decrement Operator
Arithmetic and increment decrement Operator
Megha Sharma
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal
 

Similar to operator (1).pptx (20)

c programming2.pptx
c programming2.pptxc programming2.pptx
c programming2.pptx
 
operator ppt.ppt
operator ppt.pptoperator ppt.ppt
operator ppt.ppt
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
 
Programming presentation
Programming presentationProgramming presentation
Programming presentation
 
C basics
C basicsC basics
C basics
 
C basics
C basicsC basics
C basics
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till now
 
C++ revision add on till now
C++ revision add on till nowC++ revision add on till now
C++ revision add on till now
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
 
Programming Fundamentals lecture 7
Programming Fundamentals lecture 7Programming Fundamentals lecture 7
Programming Fundamentals lecture 7
 
What are operators?
What are operators? What are operators?
What are operators?
 
Operators
OperatorsOperators
Operators
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Theory3
Theory3Theory3
Theory3
 
Ch4 Expressions
Ch4 ExpressionsCh4 Expressions
Ch4 Expressions
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
 
Basic c operators
Basic c operatorsBasic c operators
Basic c operators
 
intro to differnt oper.pptx
intro to differnt oper.pptxintro to differnt oper.pptx
intro to differnt oper.pptx
 
Arithmetic and increment decrement Operator
Arithmetic and increment decrement OperatorArithmetic and increment decrement Operator
Arithmetic and increment decrement Operator
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 

Recently uploaded

Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
Madhumitha Jayaram
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 

Recently uploaded (20)

Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 

operator (1).pptx

  • 1. Click to edit Master title style 1 Operator in c N a m e : S u b h r a s i s B i s wa l R e g d . n o : 2 2 0 3 0 11 2 0 1 6 8
  • 2. Click to edit Master title style 2 content:- 1.Operator 2.Types of operator:- *Arithmetic operator *Assignment operator *Increment and decrement operator *Relational operator *Logical operator *Conditional operator *Bitwise operator *Binary operator 2
  • 3. Click to edit Master title style 3 Operator C operator are one of the features in C which has symbols that can be used to perform mathematical, relational, bitwise, conditional or logical manipulations. The C programing language has a lot of built- in operators to perform various tasks as per the need of the program. An operator in C is a symbol or a keyword that performs a specific operation on one or more operands. 3
  • 4. Click to edit Master title style 4 Operator Description Example + Adds two operands a + b=30 - Subtracts second operand from the first a – b=10 * Multiplies both operands a * b=200 / Divides numerator by de numerator b/a=2 Arithmetic operator:- An arithmetic operator performs mathematical operations such as addition, subtraction, multiplication, division etc. on numerical values (constants and variables). These operators can be used to perform simple or complex calculations in various programming languages and applications.
  • 5. Click to edit Master title style 5 Assignment operator:-  The assignment operator is a assigns the value of its righthand operand to a variable, a property, or an indexer element given its left hand operand .  The result of an assignment expression is the value assigned to the left-hand operand. Operator Operation performed %= Reminder assignment += Addition assignment -= Subtraction assignment <<= Left-shift assignment
  • 6. Click to edit Master title style 6 Increment and decrement operators:-  The increment operator increases the value of the variable by one and the decrement operator decreases the value f the variable by one.  The increment (++) and decrement (- -) are important unary operators in c. unary operators are those which are applied on a single operand. operator Expression Description ++ ++X Pre-increment X++ Post-increment -- --X Pre-decrement X-- Post-decrement
  • 7. Click to edit Master title style 7 Relational operator:-  A relational operator checks the relationship between two operands. If the relation is true, it returns 1; if the relation is false, it returns value 0. Relational operators are used in decision making and loops. Operator Meaning of operator Example == Equal to 5==3 is evaluated to 0 > Greater than 5>3 is evaluated to 1 < Less than 5<3 is evaluated to 0 != Not equal to 5!=3 is evaluated to 1
  • 8. Click to edit Master title style 8 Logical operator :-  We use logical operators to perform various logical operations on any set of given expression.  We have three major logical operators in the c language –Logical NOT(!),Logical OR(||) and Logical AND (&&). operator description Example && Called Logical AND operator. If both the operands are non- zero, then the condition becomes true. (A && B) is false || called Logical OR Operator. If any of the two operands is non-zero, then the condition becomes true. (A || B) is true ! Called Logical NOT Operator. It is used to reverse the logical state of its operand. If a condition is true, then Logical NOT operator will make it false. ! (A && B) is true
  • 9. Click to edit Master title style 9 Conditional operator:-  A conditional operator is a single programming statement, while the ‘if-else’ statement is a programming block in which statements come under the parenthesis.  A conditional operator can also be used for assigning a value to the variable, where as the ‘if-else’ statement cannot be used for the assignment purpose. operation description Example Equal to == If(a==0) b=b+5; Not equal to != If(a!=1) b=b+4;
  • 10. Click to edit Master title style 10 Bitwise operator:-  The Bitwise Operator in C is a type of operator that operates on bit arrays, bit strings, and tweaking binary values with individual bits at the bit level.  It is mainly used in numerical computations for a faster calculation because it consists of two digits – 1 or 0. operator description & Bitwise AND | Bitwise OR ~ One’s complement << Left sift >> Right sift ^ Bitwise XOR
  • 11. Click to edit Master title style 11 Binary operator:-  A Binary operator is an operator that operates on two operands to produce a new value .  Most common binary operators are +, -, *, /, etc. Binary operators in C are further divided into - Arithmetic Operators.
  • 12. Click to edit Master title style 12