SlideShare a Scribd company logo
1
An operator is a symbol that tells the
computer to perform certain mathematical or
logical manipulations.
These operators are used in programs to
manipulate data and variables.
2
1. Arithmetic operators
2. Relational operators
3. Logical operators
4. Assignment operators
5. Increment and decrement operators
6. Conditional operators (ternary operator)
7. Bitwise operators
8. Special operators
3
Arithmetic operators are used to perform numerical calculations
among the values.
OPERATOR MEANING
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulo Division
4
#include<stdio.h>
Main()
{
int x=25;
int y=4;
printf(“%d+%d=%dn,x,y,x+y);
printf(“%d-%d=%dn,x,y,x-y);
printf(“%d*%d=%dn,x,y,x*y);
printf(“%d/%d=%dn,x,y,x/y);
printf(“%d%%%d=%dn,x,y,x%y);
5
Relational operator are used to compare two operands.
Operands may be variable, constant or expression.
OperatorOperator MeaningMeaning
< Is less than
<= Is less than equal to
> Is greater than
>= Is greater than equal to
== Equal to
!= is not equal to
6
#include<stdio.h>
void main()
{
int a, b;
printf(“Enter values for a and b : ");
scanf("%d %d", &a, &b);
printf("n The < value of a is %d", a<b);
printf("n The <= value of a is %d", a<=b);
printf("n The > value of a is %d", a>b);
printf("n The >= value of a is %d", a>=b);
printf("n The == value of a is %d", a==b);
printf("n The != value of a is %d", a!=b);
}
7
LOGICAL OPERATORS:
OPERATOR MEANING
&& Logical AND
|| Logical OR
! Logical NOT
These operators are used for testing more than one condition and
making decisions.
'C' has three logical operators they are:
8
Example:-Example:-
#Include<stdio.h>
void main()
{
int a, b;
printf(“enter values for a and b : ");
scanf(“%d %d", &a, &b);
printf("n %d",(a<b)&&(a!=B));
printf("n %d",(a<b)||(b<a));
printf("n %d",!(A==b));
}
9
ASSIGNMENT OPERATORS
Assignment operator are used to assign
the value or an expression or a variable to
another variable.
 The syntax is
variablename = expression;
i.g. A=b;
 Operators:
== , += , -= , *= , /= , %= , >>= , <<= ,
&= ,
10
Increments & decrement operator is also called Unary .
The increment operator (++++) adder on to the variable and
decrement (- -- -) subtract one from the variable. There are
following unary operator
INCREMENT & DECREMENTINCREMENT & DECREMENT
OPERATORSOPERATORS
Operator Meaning
++x++x Pre increment
- -x- -x Pre decrement
x++x++ Post increment
X- -X- - Post decrement
11
INCREMENT & DECREMENT OPERATORSINCREMENT & DECREMENT OPERATORS
EXAMPLEEXAMPLE
#include<stdio.h>
void main()
{
int a,b,c;
printf("Enter the values for a and b :");
scanf("%d %d", &a, &b);
printf("n The value of c is %d", c=++a);
printf("n The value of c is %d", c=a++);
printf("n The value of c is %d", c=--b);
printf("n The value of c is %d", c=b--);
}
12
CONDITIONALCONDITIONAL
OPERATORSOPERATORSThese conditional operator are used to construct
conditional expressions of the form.
Syntax:
exp1?exp2:exp3.
where exp1,exp2,exp3 are expressions.
Operator: ?: (ternary operator)
13
Example:-Example:-
#include<stdio.h>
void main()
{
int a, b, x;
printf("Enter the values of a add b : ");
scanf("%d %d", &a, &b);
x=(a>b)?a:b;
printf("Biggest Value is :%d",x);
}
14
Bitwise Operator:-Bitwise Operator:-
Are used by the programmer to communicate
directly with the hardware.These operator are
used for designing bit or shifting them either
right to left, left to right.
Example:-
OPERATOR MEANING
& Bitwise AND
| Bitwise OR
^ Bitwise Exclusive OR
<< Shift Left
>> Shift Right
15
SPECIAL OPERATORSSPECIAL OPERATORS
'C' supports some special operators such as comma
operator, sizeof operator and pointerpointer operators.
Comma operator:Comma operator:
the comma operator is used to combine related
expressions.
A comma linked list of expressions are evaluated
left to right and the value of right most expression is
the value of combined expression..
Example: value=(x=10, y=5, x+y);
16
Special OperatorsSpecial Operators
Contd…Contd…
Sizeof Operator:Sizeof Operator:
Sizeof is an operator used to return the
number of bytes the operand occupies.
Syntax:
m=sizeof(sum);
k=sizeof(2351);
17
18
Ad

More Related Content

What's hot (20)

Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
Manoj Tyagi
 
sSCOPE RESOLUTION OPERATOR.pptx
sSCOPE RESOLUTION OPERATOR.pptxsSCOPE RESOLUTION OPERATOR.pptx
sSCOPE RESOLUTION OPERATOR.pptx
Nidhi Mehra
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
savitamhaske
 
C operator and expression
C operator and expressionC operator and expression
C operator and expression
LavanyaManokaran
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
Chukka Nikhil Chakravarthy
 
Control structures in c++
Control structures in c++Control structures in c++
Control structures in c++
Nitin Jawla
 
Type Conversion, Precedence and Associativity
Type Conversion, Precedence and AssociativityType Conversion, Precedence and Associativity
Type Conversion, Precedence and Associativity
Aakash Singh
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
Sokngim Sa
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
Nilesh Dalvi
 
Control Flow Statements
Control Flow Statements Control Flow Statements
Control Flow Statements
Tarun Sharma
 
Preprocessor directives in c language
Preprocessor directives in c languagePreprocessor directives in c language
Preprocessor directives in c language
tanmaymodi4
 
Call by value or call by reference in C++
Call by value or call by reference in C++Call by value or call by reference in C++
Call by value or call by reference in C++
Sachin Yadav
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
programming9
 
Structures
StructuresStructures
Structures
archikabhatia
 
Algorithm and c language
Algorithm and c languageAlgorithm and c language
Algorithm and c language
kamalbeydoun
 
Logical and Conditional Operator In C language
Logical and Conditional Operator In C languageLogical and Conditional Operator In C language
Logical and Conditional Operator In C language
Abdul Rehman
 
Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
Vineeta Garg
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal
 
Recursive Function
Recursive FunctionRecursive Function
Recursive Function
Harsh Pathak
 
Relational operators
Relational operatorsRelational operators
Relational operators
Graphic Era Hill University,Bhimtal
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
Manoj Tyagi
 
sSCOPE RESOLUTION OPERATOR.pptx
sSCOPE RESOLUTION OPERATOR.pptxsSCOPE RESOLUTION OPERATOR.pptx
sSCOPE RESOLUTION OPERATOR.pptx
Nidhi Mehra
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
savitamhaske
 
Control structures in c++
Control structures in c++Control structures in c++
Control structures in c++
Nitin Jawla
 
Type Conversion, Precedence and Associativity
Type Conversion, Precedence and AssociativityType Conversion, Precedence and Associativity
Type Conversion, Precedence and Associativity
Aakash Singh
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
Sokngim Sa
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
Nilesh Dalvi
 
Control Flow Statements
Control Flow Statements Control Flow Statements
Control Flow Statements
Tarun Sharma
 
Preprocessor directives in c language
Preprocessor directives in c languagePreprocessor directives in c language
Preprocessor directives in c language
tanmaymodi4
 
Call by value or call by reference in C++
Call by value or call by reference in C++Call by value or call by reference in C++
Call by value or call by reference in C++
Sachin Yadav
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
programming9
 
Algorithm and c language
Algorithm and c languageAlgorithm and c language
Algorithm and c language
kamalbeydoun
 
Logical and Conditional Operator In C language
Logical and Conditional Operator In C languageLogical and Conditional Operator In C language
Logical and Conditional Operator In C language
Abdul Rehman
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal
 
Recursive Function
Recursive FunctionRecursive Function
Recursive Function
Harsh Pathak
 

Viewers also liked (20)

Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
Prabhu Govind
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
vinay arora
 
C ppt
C pptC ppt
C ppt
jasmeen kr
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
vishaljot_kaur
 
Excel Based IP Functions
Excel Based IP FunctionsExcel Based IP Functions
Excel Based IP Functions
Rajiv Bhardwaj
 
Slides chapter 16
Slides chapter 16Slides chapter 16
Slides chapter 16
Priyanka Shetty
 
Elm intro
Elm introElm intro
Elm intro
Gonzalo Gabriel Jiménez Fuentes
 
Hr development, methods and desig
Hr development, methods and desigHr development, methods and desig
Hr development, methods and desig
Prakash Dhakal
 
The 8051 assembly language
The 8051 assembly languageThe 8051 assembly language
The 8051 assembly language
hemant meena
 
mySQL - INSERT INTO
mySQL - INSERT INTOmySQL - INSERT INTO
mySQL - INSERT INTO
lehrerfreund
 
Comment être agile dans un contexte non lié aux TI ?
Comment être agile dans un contexte non lié aux TI ?Comment être agile dans un contexte non lié aux TI ?
Comment être agile dans un contexte non lié aux TI ?
Pyxis Technologies
 
Convegno la mela nel mondo interpoma bz - 16-11-2012 1+2 - martin thalheime...
Convegno la mela nel mondo   interpoma bz - 16-11-2012 1+2 - martin thalheime...Convegno la mela nel mondo   interpoma bz - 16-11-2012 1+2 - martin thalheime...
Convegno la mela nel mondo interpoma bz - 16-11-2012 1+2 - martin thalheime...
Image Line
 
Scrum Guide
Scrum GuideScrum Guide
Scrum Guide
Denis Voituron
 
area econòmica i patrimonial
area econòmica i patrimonialarea econòmica i patrimonial
area econòmica i patrimonial
Sandro
 
Canvi climàtic: Efectes i percepció social
Canvi climàtic: Efectes i percepció socialCanvi climàtic: Efectes i percepció social
Canvi climàtic: Efectes i percepció social
Josep Lluís Ruiz
 
Le Lean Product Management présenté au LeanKanban Day 2015
Le Lean Product Management présenté au LeanKanban Day 2015Le Lean Product Management présenté au LeanKanban Day 2015
Le Lean Product Management présenté au LeanKanban Day 2015
Sébastien Sacard
 
Arquitectura de Computadores (II Bimestre)
Arquitectura de Computadores (II Bimestre)Arquitectura de Computadores (II Bimestre)
Arquitectura de Computadores (II Bimestre)
Videoconferencias UTPL
 
Tema 3 Dissolucions 1er batxillerat
Tema 3 Dissolucions 1er batxilleratTema 3 Dissolucions 1er batxillerat
Tema 3 Dissolucions 1er batxillerat
mmarti61
 
Les propietats dels materials i els assaigs d'estudi
Les propietats dels materials i els assaigs d'estudiLes propietats dels materials i els assaigs d'estudi
Les propietats dels materials i els assaigs d'estudi
Glòria García García
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
Prabhu Govind
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
vinay arora
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
vishaljot_kaur
 
Excel Based IP Functions
Excel Based IP FunctionsExcel Based IP Functions
Excel Based IP Functions
Rajiv Bhardwaj
 
Hr development, methods and desig
Hr development, methods and desigHr development, methods and desig
Hr development, methods and desig
Prakash Dhakal
 
The 8051 assembly language
The 8051 assembly languageThe 8051 assembly language
The 8051 assembly language
hemant meena
 
mySQL - INSERT INTO
mySQL - INSERT INTOmySQL - INSERT INTO
mySQL - INSERT INTO
lehrerfreund
 
Comment être agile dans un contexte non lié aux TI ?
Comment être agile dans un contexte non lié aux TI ?Comment être agile dans un contexte non lié aux TI ?
Comment être agile dans un contexte non lié aux TI ?
Pyxis Technologies
 
Convegno la mela nel mondo interpoma bz - 16-11-2012 1+2 - martin thalheime...
Convegno la mela nel mondo   interpoma bz - 16-11-2012 1+2 - martin thalheime...Convegno la mela nel mondo   interpoma bz - 16-11-2012 1+2 - martin thalheime...
Convegno la mela nel mondo interpoma bz - 16-11-2012 1+2 - martin thalheime...
Image Line
 
area econòmica i patrimonial
area econòmica i patrimonialarea econòmica i patrimonial
area econòmica i patrimonial
Sandro
 
Canvi climàtic: Efectes i percepció social
Canvi climàtic: Efectes i percepció socialCanvi climàtic: Efectes i percepció social
Canvi climàtic: Efectes i percepció social
Josep Lluís Ruiz
 
Le Lean Product Management présenté au LeanKanban Day 2015
Le Lean Product Management présenté au LeanKanban Day 2015Le Lean Product Management présenté au LeanKanban Day 2015
Le Lean Product Management présenté au LeanKanban Day 2015
Sébastien Sacard
 
Arquitectura de Computadores (II Bimestre)
Arquitectura de Computadores (II Bimestre)Arquitectura de Computadores (II Bimestre)
Arquitectura de Computadores (II Bimestre)
Videoconferencias UTPL
 
Tema 3 Dissolucions 1er batxillerat
Tema 3 Dissolucions 1er batxilleratTema 3 Dissolucions 1er batxillerat
Tema 3 Dissolucions 1er batxillerat
mmarti61
 
Les propietats dels materials i els assaigs d'estudi
Les propietats dels materials i els assaigs d'estudiLes propietats dels materials i els assaigs d'estudi
Les propietats dels materials i els assaigs d'estudi
Glòria García García
 
Ad

Similar to Operators in c language (20)

Types of Operators in C programming .pdf
Types of Operators in C programming  .pdfTypes of Operators in C programming  .pdf
Types of Operators in C programming .pdf
RichardMathengeSPASP
 
Operators in C programming language.pptx
Operators in C programming language.pptxOperators in C programming language.pptx
Operators in C programming language.pptx
b221382
 
C language operator
C language operatorC language operator
C language operator
cprogram
 
2. operator
2. operator2. operator
2. operator
Shankar Gangaju
 
2 EPT 162 Lecture 2
2 EPT 162 Lecture 22 EPT 162 Lecture 2
2 EPT 162 Lecture 2
Don Dooley
 
Operators in Computer programming presentation
Operators in Computer programming presentationOperators in Computer programming presentation
Operators in Computer programming presentation
GayathriShiva4
 
Operators1.pptx
Operators1.pptxOperators1.pptx
Operators1.pptx
HARSHSHARMA840
 
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTESUnit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
LeahRachael
 
operators.pptx
operators.pptxoperators.pptx
operators.pptx
ruchisuru20001
 
Theory3
Theory3Theory3
Theory3
Dr.M.Karthika parthasarathy
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzation
Kaushal Patel
 
OPERATORS.pptx
OPERATORS.pptxOPERATORS.pptx
OPERATORS.pptx
PMLAVANYA
 
C語言運算式和運算子
C語言運算式和運算子C語言運算式和運算子
C語言運算式和運算子
吳錫修 (ShyiShiou Wu)
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c language
Tanmay Modi
 
introduction to c programming and C History.pptx
introduction to c programming and C History.pptxintroduction to c programming and C History.pptx
introduction to c programming and C History.pptx
ManojKhadilkar1
 
C Operators and Control Structures.pdf
C Operators and Control Structures.pdfC Operators and Control Structures.pdf
C Operators and Control Structures.pdf
MaryJacob24
 
PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptx
Nithya K
 
Unit 2
Unit 2Unit 2
Unit 2
DURGADEVIP
 
Expressions using operator in c
Expressions using operator in cExpressions using operator in c
Expressions using operator in c
Saranya saran
 
Fucntions & Pointers in C
Fucntions & Pointers in CFucntions & Pointers in C
Fucntions & Pointers in C
Janani Satheshkumar
 
Types of Operators in C programming .pdf
Types of Operators in C programming  .pdfTypes of Operators in C programming  .pdf
Types of Operators in C programming .pdf
RichardMathengeSPASP
 
Operators in C programming language.pptx
Operators in C programming language.pptxOperators in C programming language.pptx
Operators in C programming language.pptx
b221382
 
C language operator
C language operatorC language operator
C language operator
cprogram
 
2 EPT 162 Lecture 2
2 EPT 162 Lecture 22 EPT 162 Lecture 2
2 EPT 162 Lecture 2
Don Dooley
 
Operators in Computer programming presentation
Operators in Computer programming presentationOperators in Computer programming presentation
Operators in Computer programming presentation
GayathriShiva4
 
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTESUnit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
LeahRachael
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzation
Kaushal Patel
 
OPERATORS.pptx
OPERATORS.pptxOPERATORS.pptx
OPERATORS.pptx
PMLAVANYA
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c language
Tanmay Modi
 
introduction to c programming and C History.pptx
introduction to c programming and C History.pptxintroduction to c programming and C History.pptx
introduction to c programming and C History.pptx
ManojKhadilkar1
 
C Operators and Control Structures.pdf
C Operators and Control Structures.pdfC Operators and Control Structures.pdf
C Operators and Control Structures.pdf
MaryJacob24
 
PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptx
Nithya K
 
Expressions using operator in c
Expressions using operator in cExpressions using operator in c
Expressions using operator in c
Saranya saran
 
Ad

Recently uploaded (20)

acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
Guru Nanak Technical Institutions
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 

Operators in c language

  • 1. 1
  • 2. An operator is a symbol that tells the computer to perform certain mathematical or logical manipulations. These operators are used in programs to manipulate data and variables. 2
  • 3. 1. Arithmetic operators 2. Relational operators 3. Logical operators 4. Assignment operators 5. Increment and decrement operators 6. Conditional operators (ternary operator) 7. Bitwise operators 8. Special operators 3
  • 4. Arithmetic operators are used to perform numerical calculations among the values. OPERATOR MEANING + Addition - Subtraction * Multiplication / Division % Modulo Division 4
  • 6. Relational operator are used to compare two operands. Operands may be variable, constant or expression. OperatorOperator MeaningMeaning < Is less than <= Is less than equal to > Is greater than >= Is greater than equal to == Equal to != is not equal to 6
  • 7. #include<stdio.h> void main() { int a, b; printf(“Enter values for a and b : "); scanf("%d %d", &a, &b); printf("n The < value of a is %d", a<b); printf("n The <= value of a is %d", a<=b); printf("n The > value of a is %d", a>b); printf("n The >= value of a is %d", a>=b); printf("n The == value of a is %d", a==b); printf("n The != value of a is %d", a!=b); } 7
  • 8. LOGICAL OPERATORS: OPERATOR MEANING && Logical AND || Logical OR ! Logical NOT These operators are used for testing more than one condition and making decisions. 'C' has three logical operators they are: 8
  • 9. Example:-Example:- #Include<stdio.h> void main() { int a, b; printf(“enter values for a and b : "); scanf(“%d %d", &a, &b); printf("n %d",(a<b)&&(a!=B)); printf("n %d",(a<b)||(b<a)); printf("n %d",!(A==b)); } 9
  • 10. ASSIGNMENT OPERATORS Assignment operator are used to assign the value or an expression or a variable to another variable.  The syntax is variablename = expression; i.g. A=b;  Operators: == , += , -= , *= , /= , %= , >>= , <<= , &= , 10
  • 11. Increments & decrement operator is also called Unary . The increment operator (++++) adder on to the variable and decrement (- -- -) subtract one from the variable. There are following unary operator INCREMENT & DECREMENTINCREMENT & DECREMENT OPERATORSOPERATORS Operator Meaning ++x++x Pre increment - -x- -x Pre decrement x++x++ Post increment X- -X- - Post decrement 11
  • 12. INCREMENT & DECREMENT OPERATORSINCREMENT & DECREMENT OPERATORS EXAMPLEEXAMPLE #include<stdio.h> void main() { int a,b,c; printf("Enter the values for a and b :"); scanf("%d %d", &a, &b); printf("n The value of c is %d", c=++a); printf("n The value of c is %d", c=a++); printf("n The value of c is %d", c=--b); printf("n The value of c is %d", c=b--); } 12
  • 13. CONDITIONALCONDITIONAL OPERATORSOPERATORSThese conditional operator are used to construct conditional expressions of the form. Syntax: exp1?exp2:exp3. where exp1,exp2,exp3 are expressions. Operator: ?: (ternary operator) 13
  • 14. Example:-Example:- #include<stdio.h> void main() { int a, b, x; printf("Enter the values of a add b : "); scanf("%d %d", &a, &b); x=(a>b)?a:b; printf("Biggest Value is :%d",x); } 14
  • 15. Bitwise Operator:-Bitwise Operator:- Are used by the programmer to communicate directly with the hardware.These operator are used for designing bit or shifting them either right to left, left to right. Example:- OPERATOR MEANING & Bitwise AND | Bitwise OR ^ Bitwise Exclusive OR << Shift Left >> Shift Right 15
  • 16. SPECIAL OPERATORSSPECIAL OPERATORS 'C' supports some special operators such as comma operator, sizeof operator and pointerpointer operators. Comma operator:Comma operator: the comma operator is used to combine related expressions. A comma linked list of expressions are evaluated left to right and the value of right most expression is the value of combined expression.. Example: value=(x=10, y=5, x+y); 16
  • 17. Special OperatorsSpecial Operators Contd…Contd… Sizeof Operator:Sizeof Operator: Sizeof is an operator used to return the number of bytes the operand occupies. Syntax: m=sizeof(sum); k=sizeof(2351); 17
  • 18. 18
  翻译: