OPERATOR
OPERATOR
A Operator specifies an operation to be
performed that yields a value.
The variable, constant can be joined by
various operator to form an expression and
operand on which an operator act some
operators require to operands, while other
act upon only one operand.
OPERATORS
a) Arithmetic Operator
b) Assignment Operator
c) Increment/Decrement Operator
d) Sizeof Operator
e) Ternary Operator
f) Comma Operator
g) Logical Operator
h) Relational Operator
i) Bitwise Operator
ARITHMETIC OPERATOR
Arithmetic operator are used for numeric
calculations. They are of two types-
1) Unary arithmetic operator- Unary operators
require only one operand.
Example- ( ++x, --x) prefix, (x++, x–-) postfix
1) Binary Arithmetic Operator- require two
operands.
Example- (a + b), (x-y), (p*q), (s/t) and (m % n)
ARITHMETIC OPERATOR
#include<stdio.h>
#include<conio.h>
void main()
{
int a=5, b=6;
printf(“%d”,++a);//unary ,prefix
printf(“%d”,--a); //unary ,prefix
printf(“%d”,a++);//Unary ,Postfix
printf(“%d”,a--);//Unary, Postfix
printf(“%d”,(a+b)); //Binary
printf(“%d”,(b-a)); //Binary
printf(“%d”,(a*b)); //Binary
printf(“%d”,(b/a)); //Binary
printf(“%d”,(b%a)); //Binary
getch();
}
6
5
5
6
11
1
30
1
1
OUTPUT SCREEN
BINARY ARITHMETIC OPERATOR
Binary arithmetic operator are three types-
1) Integer Arithmetic operator
2) Floating Arithmetic operator
3) Mixed mode Arithmetic operator
Integer Arithmetic operator
#include<stdio.h>
#include<conio.h>
void main()
{
int a=17, b=4;
printf(“%d”,(a+b)); //Binary
printf(“%d”,(a-b)); //Binary
printf(“%d”,(a*b)); //Binary
printf(“%d”,(a/b)); //Binary
printf(“%d”,(b%a)); //Binary
getch();
}
21
13
68
4
1
OUTPUT SCREEN
Floating Arithmetic operator
#include<stdio.h>
#include<conio.h>
void main()
{
float a=12.4, b=3.1;
printf(“%d”,(a+b)); //Binary
printf(“%d”,(a-b)); //Binary
printf(“%d”,(a*b)); //Binary
printf(“%d”,(a/b)); //Binary
getch();
}
15.5
9.3
38.44
4.0
OUTPUT SCREEN
Mixed mode Arithmetic operator
#include<stdio.h>
#include<conio.h>
void main()
{
float a=12, b=2.5;
printf(“%d”,(a+b)); //Binary
printf(“%d”,(a-b)); //Binary
printf(“%d”,(a*b)); //Binary
printf(“%d”,(a/b)); //Binary
getch();
}
14.5
9.5
30.0
4.8
OUTPUT SCREEN
Operator in c

More Related Content

PDF
Programming C Part 02
PPTX
Operations research
PDF
Arithmetic operator
PPTX
MCM FUNCTIONS BLACKBOARD COMPATIBILITY
PPTX
BB - Functions (Operations and Piecewise)
PPTX
Cse lecture-4.1-c operators and expression
PPTX
Functions in c++
PPTX
Sequential multiplication
Programming C Part 02
Operations research
Arithmetic operator
MCM FUNCTIONS BLACKBOARD COMPATIBILITY
BB - Functions (Operations and Piecewise)
Cse lecture-4.1-c operators and expression
Functions in c++
Sequential multiplication

What's hot (20)

DOCX
Bti1022 lab sheet 8
PDF
Examplelf flowchart
PPTX
Sequential circuit multiplier
PPTX
C operators
PPTX
Operators and expression in c#
PPTX
2.2.1 the grahp of a function
DOCX
ECO 550 week 4 chapter 7 and chapter 8 problems
PDF
Infix to Prefix (Conversion, Evaluation, Code)
PPT
Operators in C
PDF
Manipulators
PPT
Lab 1
DOC
Ffffffffffff
PPTX
OPERATOR IN PYTHON-PART1
PDF
Matlab colon notation
DOC
C program to add two numbers
PPTX
Lecture 1 mte 407
PPTX
Lecture 1 mte 407
PPTX
3. user input and some basic problem
PDF
Cs8261 cp lab syllabus
PDF
C programs Set 2
Bti1022 lab sheet 8
Examplelf flowchart
Sequential circuit multiplier
C operators
Operators and expression in c#
2.2.1 the grahp of a function
ECO 550 week 4 chapter 7 and chapter 8 problems
Infix to Prefix (Conversion, Evaluation, Code)
Operators in C
Manipulators
Lab 1
Ffffffffffff
OPERATOR IN PYTHON-PART1
Matlab colon notation
C program to add two numbers
Lecture 1 mte 407
Lecture 1 mte 407
3. user input and some basic problem
Cs8261 cp lab syllabus
C programs Set 2
Ad

Similar to Operator in c (20)

PPTX
Chapter 3 dti2143
PPTX
PPTX
programing in c PPT Gaurav Nautiyal.pptx
PDF
2 EPT 162 Lecture 2
PDF
Operators in c programming
PPTX
3. C_OperatorsExpressions on c languyage.pptx
PPTX
OPERATORS IN C.pptx
PPTX
OPERATORS IN C.pptx
PPT
operators and arithmatic expression in C Language
PPTX
operators.pptx
PPTX
operatorsincprogramming-190221094522.pptx
PPTX
Operator in programming in C engineering
PPTX
Simran Roy Operator in Programming in C Language
PPTX
Arithmetic and Arithmetic assignment operators
PPT
Operators in c language
PPTX
C language operators
PPTX
OPERATORS.pptx
PPTX
ppt on logical/arthimatical/conditional operators
PPT
CppOperators.ppt
PDF
Types of Operators in C programming .pdf
Chapter 3 dti2143
programing in c PPT Gaurav Nautiyal.pptx
2 EPT 162 Lecture 2
Operators in c programming
3. C_OperatorsExpressions on c languyage.pptx
OPERATORS IN C.pptx
OPERATORS IN C.pptx
operators and arithmatic expression in C Language
operators.pptx
operatorsincprogramming-190221094522.pptx
Operator in programming in C engineering
Simran Roy Operator in Programming in C Language
Arithmetic and Arithmetic assignment operators
Operators in c language
C language operators
OPERATORS.pptx
ppt on logical/arthimatical/conditional operators
CppOperators.ppt
Types of Operators in C programming .pdf
Ad

More from ankush9927 (14)

PPTX
Computer HARDWARE presenattion by CWD students class 10
PPTX
Cell - Animal/plant
PPTX
Part of speech
PPTX
PART OF SPEECH
PPTX
Parts Of Speech
PPTX
Himanshu Chaudhary class 9th.pptx
PPTX
Number system
PPTX
Number system part 2
PPTX
Identifier in c
PPTX
C structure
PPTX
History of c
PPTX
Topology
PPTX
Theprisonsystemxtracredit 120426084243-phpapp01
PDF
Introduction to networks11
Computer HARDWARE presenattion by CWD students class 10
Cell - Animal/plant
Part of speech
PART OF SPEECH
Parts Of Speech
Himanshu Chaudhary class 9th.pptx
Number system
Number system part 2
Identifier in c
C structure
History of c
Topology
Theprisonsystemxtracredit 120426084243-phpapp01
Introduction to networks11

Recently uploaded (20)

PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Architecture types and enterprise applications.pdf
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
TEXTILE technology diploma scope and career opportunities
PPTX
Modernising the Digital Integration Hub
PDF
CloudStack 4.21: First Look Webinar slides
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Five Habits of High-Impact Board Members
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Getting started with AI Agents and Multi-Agent Systems
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Enhancing plagiarism detection using data pre-processing and machine learning...
A contest of sentiment analysis: k-nearest neighbor versus neural network
Architecture types and enterprise applications.pdf
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
OpenACC and Open Hackathons Monthly Highlights July 2025
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
TEXTILE technology diploma scope and career opportunities
Modernising the Digital Integration Hub
CloudStack 4.21: First Look Webinar slides
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
A review of recent deep learning applications in wood surface defect identifi...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Five Habits of High-Impact Board Members
A proposed approach for plagiarism detection in Myanmar Unicode text
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
The influence of sentiment analysis in enhancing early warning system model f...
Getting started with AI Agents and Multi-Agent Systems

Operator in c

  • 2. OPERATOR A Operator specifies an operation to be performed that yields a value. The variable, constant can be joined by various operator to form an expression and operand on which an operator act some operators require to operands, while other act upon only one operand.
  • 3. OPERATORS a) Arithmetic Operator b) Assignment Operator c) Increment/Decrement Operator d) Sizeof Operator e) Ternary Operator f) Comma Operator g) Logical Operator h) Relational Operator i) Bitwise Operator
  • 4. ARITHMETIC OPERATOR Arithmetic operator are used for numeric calculations. They are of two types- 1) Unary arithmetic operator- Unary operators require only one operand. Example- ( ++x, --x) prefix, (x++, x–-) postfix 1) Binary Arithmetic Operator- require two operands. Example- (a + b), (x-y), (p*q), (s/t) and (m % n)
  • 5. ARITHMETIC OPERATOR #include<stdio.h> #include<conio.h> void main() { int a=5, b=6; printf(“%d”,++a);//unary ,prefix printf(“%d”,--a); //unary ,prefix printf(“%d”,a++);//Unary ,Postfix printf(“%d”,a--);//Unary, Postfix printf(“%d”,(a+b)); //Binary printf(“%d”,(b-a)); //Binary printf(“%d”,(a*b)); //Binary printf(“%d”,(b/a)); //Binary printf(“%d”,(b%a)); //Binary getch(); } 6 5 5 6 11 1 30 1 1 OUTPUT SCREEN
  • 6. BINARY ARITHMETIC OPERATOR Binary arithmetic operator are three types- 1) Integer Arithmetic operator 2) Floating Arithmetic operator 3) Mixed mode Arithmetic operator
  • 7. Integer Arithmetic operator #include<stdio.h> #include<conio.h> void main() { int a=17, b=4; printf(“%d”,(a+b)); //Binary printf(“%d”,(a-b)); //Binary printf(“%d”,(a*b)); //Binary printf(“%d”,(a/b)); //Binary printf(“%d”,(b%a)); //Binary getch(); } 21 13 68 4 1 OUTPUT SCREEN
  • 8. Floating Arithmetic operator #include<stdio.h> #include<conio.h> void main() { float a=12.4, b=3.1; printf(“%d”,(a+b)); //Binary printf(“%d”,(a-b)); //Binary printf(“%d”,(a*b)); //Binary printf(“%d”,(a/b)); //Binary getch(); } 15.5 9.3 38.44 4.0 OUTPUT SCREEN
  • 9. Mixed mode Arithmetic operator #include<stdio.h> #include<conio.h> void main() { float a=12, b=2.5; printf(“%d”,(a+b)); //Binary printf(“%d”,(a-b)); //Binary printf(“%d”,(a*b)); //Binary printf(“%d”,(a/b)); //Binary getch(); } 14.5 9.5 30.0 4.8 OUTPUT SCREEN