SlideShare a Scribd company logo
C language
Operator
PANCHAL KARTIK J
COMPUTER ENGINEERING
Topic
 Operator
 Program
Operator
 There are 8 operator
1. Arithmetic operator
2. Logical operator
3. Bitwise operator
4. increment and decrement operator
5. Relational operator
6. Assignment operator
7. Conditional operator
8. Other special operator
Arithmetic operator
Operator name Meaning
+ Add
- Subtract
* Multiply
/ Divide
% Modulo division
Program
#include<stdio.h>
void main()
{
int x = 25 , y = 5
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 );
getch();
}
Output
25 + 5 = 30
25 – 5 = 20
25 * 5 = 125
25 / 5 = 5
Logical operator
Operator name Meaning
&& Logical AND
|| Logical OR
! Logical NOT
Logical operator
Expression Value
a>b && c==5 True
! (5>3) False
a<b || c>10 True
(b>a) && (c!=5) False
(b<c||b<a)&&(c==5) True
Bitwise operator
Operator name Meaning
& Bit-wise AND
| Bit-wise OR
^ Bit-wise XOR
<< Left shift
>> Right shift
~ Bit-wise 1`s complement
increment and decrement operator
 Increment means i++ or ++i
 some example i=5 than i++ in result is 6
 Decrement means i-- or --I
 Some example i=5 than i– in result is 4
 i++ and i-- is postfix
++i and --i is prefix
Relational operator
Operator name Meaning
== Equals
!= Not equals to
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to
Assignment operator
 assignment operator symbol is =
 assignment operator is used to value to variable
varname = varname operator expression ;
varname operator = expression;
 Example
1. a = a + 5 ; a += 5;
Conditional operator
 It is also knows as a ternary operator
 it is used to
Expr1 ? Expr2 : expr3 ;
 logical operator is true and false
 expr2 is true is the print to the display and expr3 is not print
 expr3 is true is the print to the display and expr2 is not print
Other special operator
 they are special operator sizeof , arrow , dot , * , & , -> etc
Simple program
#include<stdio.h>
#include<conio.h>
void main()
{
int x = 10 , y , z = 0;
x++;
++x;
y = ++x;
printf(“value of x = %d y = %d and x = %dn”, x , y , z);
z = y--;
printf(“value of x = %d y = %d and x = %dn”, x , y , z);
getch();
}
Output
Value of x = 13 y = 13 and z =0
Value of x = 13 y = 12 and z = 13
C language operator

More Related Content

What's hot (20)

PPT
C operator and expression
LavanyaManokaran
 
PPTX
Operator of C language
Kritika Chauhan
 
PPTX
Input output statement in C
Muthuganesh S
 
PDF
ICP - Lecture 5
Hassaan Rahman
 
PDF
Types of Operators in C
Thesis Scientist Private Limited
 
PPTX
Basic c operators
dishti7
 
PPTX
Input Output Management In C Programming
Kamal Acharya
 
PPTX
C Operators
Yash Modi
 
PPT
Mesics lecture 4 c operators and experssions
eShikshak
 
PPTX
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
vikram mahendra
 
PPTX
CSE240 Pointers
Garrett Gutierrez
 
PPTX
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
vikram mahendra
 
PDF
Python iteration
dietbuddha
 
PPT
2. operators in c
amar kakde
 
DOCX
C language assignment help
Online Assignment Help
 
PPTX
Operator in c programming
Manoj Tyagi
 
PPTX
Array menu
Sayantan Sur
 
PPTX
Functions
Arpit Modh
 
PPTX
Operators-computer programming and utilzation
Kaushal Patel
 
C operator and expression
LavanyaManokaran
 
Operator of C language
Kritika Chauhan
 
Input output statement in C
Muthuganesh S
 
ICP - Lecture 5
Hassaan Rahman
 
Types of Operators in C
Thesis Scientist Private Limited
 
Basic c operators
dishti7
 
Input Output Management In C Programming
Kamal Acharya
 
C Operators
Yash Modi
 
Mesics lecture 4 c operators and experssions
eShikshak
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
vikram mahendra
 
CSE240 Pointers
Garrett Gutierrez
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
vikram mahendra
 
Python iteration
dietbuddha
 
2. operators in c
amar kakde
 
C language assignment help
Online Assignment Help
 
Operator in c programming
Manoj Tyagi
 
Array menu
Sayantan Sur
 
Functions
Arpit Modh
 
Operators-computer programming and utilzation
Kaushal Patel
 

Similar to C language operator (20)

PPTX
operators.pptx
ruchisuru20001
 
PPTX
Opreator In "C"
Amlendu dubey
 
PDF
Types of Operators in C programming .pdf
RichardMathengeSPASP
 
PDF
Unit ii chapter 1 operator and expressions in c
Sowmya Jyothi
 
PPT
C operators ppt
RajniKashyap9
 
PPTX
operatorsincprogramming-190221094522.pptx
ShirishaBuduputi
 
PDF
Operators in c programming
savitamhaske
 
PPTX
OPERATORS OF C++
ANANT VYAS
 
PPTX
Operators and it's type
Asheesh kushwaha
 
PDF
introduction to c programming - Topic 3.pdf
rajd20284
 
PPTX
3. C_OperatorsExpressions on c languyage.pptx
iramulittihad
 
PPTX
Operators inc c language
Tanmay Modi
 
PPTX
Operators and expressions in c language
tanmaymodi4
 
PPTX
C PRESENTATION.pptx
VAIBHAV175947
 
PPTX
Cse lecture-4.1-c operators and expression
FarshidKhan
 
PPTX
operator (1).pptx
laptophp39
 
PPT
Lecture 7- Operators and Expressions
Md. Imran Hossain Showrov
 
PPTX
Operators in C programming language.pptx
b221382
 
DOCX
C – operators and expressions
Chukka Nikhil Chakravarthy
 
PPTX
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
LeahRachael
 
operators.pptx
ruchisuru20001
 
Opreator In "C"
Amlendu dubey
 
Types of Operators in C programming .pdf
RichardMathengeSPASP
 
Unit ii chapter 1 operator and expressions in c
Sowmya Jyothi
 
C operators ppt
RajniKashyap9
 
operatorsincprogramming-190221094522.pptx
ShirishaBuduputi
 
Operators in c programming
savitamhaske
 
OPERATORS OF C++
ANANT VYAS
 
Operators and it's type
Asheesh kushwaha
 
introduction to c programming - Topic 3.pdf
rajd20284
 
3. C_OperatorsExpressions on c languyage.pptx
iramulittihad
 
Operators inc c language
Tanmay Modi
 
Operators and expressions in c language
tanmaymodi4
 
C PRESENTATION.pptx
VAIBHAV175947
 
Cse lecture-4.1-c operators and expression
FarshidKhan
 
operator (1).pptx
laptophp39
 
Lecture 7- Operators and Expressions
Md. Imran Hossain Showrov
 
Operators in C programming language.pptx
b221382
 
C – operators and expressions
Chukka Nikhil Chakravarthy
 
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
LeahRachael
 
Ad

More from cprogram (6)

PPTX
C language operator part 2
cprogram
 
PDF
C language 1
cprogram
 
PDF
C language algorithms
cprogram
 
PDF
C language flowcharat
cprogram
 
PDF
C language instroduction
cprogram
 
PDF
C language history
cprogram
 
C language operator part 2
cprogram
 
C language 1
cprogram
 
C language algorithms
cprogram
 
C language flowcharat
cprogram
 
C language instroduction
cprogram
 
C language history
cprogram
 
Ad

Recently uploaded (20)

PDF
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
PPTX
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
PPTX
Basics of Auto Computer Aided Drafting .pptx
Krunal Thanki
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
PPTX
Inventory management chapter in automation and robotics.
atisht0104
 
PPTX
quantum computing transition from classical mechanics.pptx
gvlbcy
 
PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PPTX
Online Cab Booking and Management System.pptx
diptipaneri80
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PPTX
ENSA_Module_7.pptx_wide_area_network_concepts
RanaMukherjee24
 
PPTX
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PPTX
Precedence and Associativity in C prog. language
Mahendra Dheer
 
PDF
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
PPTX
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
PPTX
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
Basics of Auto Computer Aided Drafting .pptx
Krunal Thanki
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
Inventory management chapter in automation and robotics.
atisht0104
 
quantum computing transition from classical mechanics.pptx
gvlbcy
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
Online Cab Booking and Management System.pptx
diptipaneri80
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
ENSA_Module_7.pptx_wide_area_network_concepts
RanaMukherjee24
 
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
Precedence and Associativity in C prog. language
Mahendra Dheer
 
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 

C language operator