SlideShare ist ein Scribd-Unternehmen logo
1 von 18
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

Weitere ähnliche Inhalte

Was ist angesagt?

Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressionsvishaljot_kaur
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming Kamal Acharya
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C BUBT
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator OverloadingNilesh Dalvi
 
Exception handling c++
Exception handling c++Exception handling c++
Exception handling c++Jayant Dalvi
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01Wingston
 
Function overloading(c++)
Function overloading(c++)Function overloading(c++)
Function overloading(c++)Ritika Sharma
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control StructureSokngim Sa
 
Input and output in C++
Input and output in C++Input and output in C++
Input and output in C++Nilesh Dalvi
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructorsNilesh Dalvi
 

Was ist angesagt? (20)

C functions
C functionsC functions
C functions
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming
 
Operators in C++
Operators in C++Operators in C++
Operators in C++
 
C tokens
C tokensC tokens
C tokens
 
The string class
The string classThe string class
The string class
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C
 
Functions in c
Functions in cFunctions in c
Functions in c
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
Exception handling c++
Exception handling c++Exception handling c++
Exception handling c++
 
Functions in C
Functions in CFunctions in C
Functions in C
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Function overloading(c++)
Function overloading(c++)Function overloading(c++)
Function overloading(c++)
 
Control statements
Control statementsControl statements
Control statements
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
 
Input and output in C++
Input and output in C++Input and output in C++
Input and output in C++
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 

Andere mochten auch

Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in CPrabhu Govind
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressionsvinay arora
 
Excel Based IP Functions
Excel Based IP FunctionsExcel Based IP Functions
Excel Based IP FunctionsRajiv Bhardwaj
 
Hr development, methods and desig
Hr development, methods and desigHr development, methods and desig
Hr development, methods and desigPrakash Dhakal
 
The 8051 assembly language
The 8051 assembly languageThe 8051 assembly language
The 8051 assembly languagehemant meena
 
mySQL - INSERT INTO
mySQL - INSERT INTOmySQL - INSERT INTO
mySQL - INSERT INTOlehrerfreund
 
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 patrimonialSandro
 
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ó socialJosep 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 2015Sé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 batxilleratmmarti61
 
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'estudiGlòria García García
 

Andere mochten auch (20)

Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
 
C ppt
C pptC ppt
C ppt
 
Excel Based IP Functions
Excel Based IP FunctionsExcel Based IP Functions
Excel Based IP Functions
 
Slides chapter 16
Slides chapter 16Slides chapter 16
Slides chapter 16
 
Elm intro
Elm introElm intro
Elm intro
 
Hr development, methods and desig
Hr development, methods and desigHr development, methods and desig
Hr development, methods and desig
 
The 8051 assembly language
The 8051 assembly languageThe 8051 assembly language
The 8051 assembly language
 
mySQL - INSERT INTO
mySQL - INSERT INTOmySQL - INSERT INTO
mySQL - INSERT INTO
 
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 ?
 
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...
 
Scrum Guide
Scrum GuideScrum Guide
Scrum Guide
 
Lliço5 Cinèticaquímica
Lliço5 CinèticaquímicaLliço5 Cinèticaquímica
Lliço5 Cinèticaquímica
 
area econòmica i patrimonial
area econòmica i patrimonialarea econòmica i patrimonial
area econòmica i patrimonial
 
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
 
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
 
Arquitectura de Computadores (II Bimestre)
Arquitectura de Computadores (II Bimestre)Arquitectura de Computadores (II Bimestre)
Arquitectura de Computadores (II Bimestre)
 
Tema 3 Dissolucions 1er batxillerat
Tema 3 Dissolucions 1er batxilleratTema 3 Dissolucions 1er batxillerat
Tema 3 Dissolucions 1er batxillerat
 
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
 
Tema15
Tema15Tema15
Tema15
 

Ähnlich wie Operators in c language

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 .pdfRichardMathengeSPASP
 
C language operator
C language operatorC language operator
C language operatorcprogram
 
2 EPT 162 Lecture 2
2 EPT 162 Lecture 22 EPT 162 Lecture 2
2 EPT 162 Lecture 2Don Dooley
 
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 NOTESLeahRachael
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzationKaushal Patel
 
OPERATORS.pptx
OPERATORS.pptxOPERATORS.pptx
OPERATORS.pptxPMLAVANYA
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c languageTanmay 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.pptxManojKhadilkar1
 
C Operators and Control Structures.pdf
C Operators and Control Structures.pdfC Operators and Control Structures.pdf
C Operators and Control Structures.pdfMaryJacob24
 
PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxNithya K
 
Expressions using operator in c
Expressions using operator in cExpressions using operator in c
Expressions using operator in cSaranya saran
 
Intro to c chapter cover 1 4
Intro to c chapter cover 1 4Intro to c chapter cover 1 4
Intro to c chapter cover 1 4Hazwan Arif
 
ppt on logical/arthimatical/conditional operators
ppt on logical/arthimatical/conditional operatorsppt on logical/arthimatical/conditional operators
ppt on logical/arthimatical/conditional operatorsAmrinder Sidhu
 

Ähnlich wie 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
 
C language operator
C language operatorC language operator
C language operator
 
2. operator
2. operator2. operator
2. operator
 
2 EPT 162 Lecture 2
2 EPT 162 Lecture 22 EPT 162 Lecture 2
2 EPT 162 Lecture 2
 
Operators1.pptx
Operators1.pptxOperators1.pptx
Operators1.pptx
 
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
 
operators.pptx
operators.pptxoperators.pptx
operators.pptx
 
Theory3
Theory3Theory3
Theory3
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzation
 
OPERATORS.pptx
OPERATORS.pptxOPERATORS.pptx
OPERATORS.pptx
 
C語言運算式和運算子
C語言運算式和運算子C語言運算式和運算子
C語言運算式和運算子
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c language
 
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
 
C Operators and Control Structures.pdf
C Operators and Control Structures.pdfC Operators and Control Structures.pdf
C Operators and Control Structures.pdf
 
PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptx
 
Unit 2
Unit 2Unit 2
Unit 2
 
Expressions using operator in c
Expressions using operator in cExpressions using operator in c
Expressions using operator in c
 
Fucntions & Pointers in C
Fucntions & Pointers in CFucntions & Pointers in C
Fucntions & Pointers in C
 
Intro to c chapter cover 1 4
Intro to c chapter cover 1 4Intro to c chapter cover 1 4
Intro to c chapter cover 1 4
 
ppt on logical/arthimatical/conditional operators
ppt on logical/arthimatical/conditional operatorsppt on logical/arthimatical/conditional operators
ppt on logical/arthimatical/conditional operators
 

Kürzlich hochgeladen

Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSsandhya757531
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming languageSmritiSharma901052
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 

Kürzlich hochgeladen (20)

Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming language
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 

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