SlideShare a Scribd company logo
Introduction To C Programming
PRESENTATION BY AMRINDER PAL SINGH(BCA 1-EVENING)
Operators In C
 There Are Following Types FO]]Of Operators In C Such A:
 Arithmetic Operators
 Relational Operators
 Logical Operators
 Conditional Operators
 Assignment Opertors
 Increment/Decrements Operators
 Bitwise Operators
 Special Operators
Arithmetic Operators
 What Are Arithmetic Operators?
 Arithmetic Operators Are Those Operators Which Are Used To Perform
Arithmetical/Mathematical Operations In C.
 Examples Are:
 +(Plus) Used For Addition
 -(Minus) Used For Subtraction
 *(Multiply) Used For Multiplication
 /(Divide) Used For Division
 %(Modulus) Used For Modulation Or Finding Of remainder
Arithmetic Operators
 Syntax:
#include<stdio.h>
void main()
{int a, b, c; // This Program Is used For Addition process
printf(“Enter Two Numbers:n”);
scanf(“%d,%d”,&a,&b);
c=a+b;
printf(“Answer Is %d”,c);
}
Arithmetic Operators
 Output
Enter Two Numbers:
2, 4
Answer Is 6
Logical Operators
 What Are Logical Operators?
 These Operators Are Used To Test One Or More Conditions(Or To Perform
Logical operations)
 Examples
 “&&” Logical And If both the operands are non-zero, then the condition
becomes true
 “||” Logical OR If any of the two operands is non-zero, then the condition
becomes true.
 ! Logical Not If a condition is true, then Logical NOT operator will make it
false.
Logical Operators
 Syntax
 #include <stdio.h>
void main()
{ int a = 5, b = 20, c ;
if ( a && b )
{ printf("Line 1 - Condition is truen" ); }
if ( a || b )
{ printf("Line 2 - Condition is truen" );
}
Logical Operators
 /* lets change the value of a and b */
a = 0; b = 10;
if ( a && b )
{ printf("Line 3 - Condition is truen" );
} else
{ printf("Line 3 - Condition is not truen" );
} if ( !(a && b) )
{ printf("Line 4 - Condition is truen" ); } }
Logical operators
 Output
Line 1 - Condition is true
Line 2 - Condition is true
Line 3 - Condition is not true
Line 4 - Condition is true
Conditional Operators
 What Are Conditional Operators?
 Conditional Operators Is A Turnary Operators Which Is A Set Off 2 Symbols
Or Operators.
 Examples
 (x>y)?prinft(“%d”,x):(“%d”,y);
Conditional Operators
 Syntax
 #include<stdio.h>
void main()
{ int a, b;
printf(“Enter Two Number:n”);
scanf(“%d”,&a,&b);
(a>b)?printf(“%d Is Greater”,x):printf(“%d Is greater”,y);
}
Conditional Operators
 Output
Enter two numbers:
22, 55
55 Is Greater

More Related Content

PPTX
Managing input and output operations in c
niyamathShariff
 
PDF
Compiler unit 1
BBDITM LUCKNOW
 
PPTX
Access modifiers in java
Sourabrata Mukherjee
 
PPTX
Operators and expressions in c language
tanmaymodi4
 
PPT
6 operators-in-c
Rohit Shrivastava
 
PPTX
Data types in c++
Venkata.Manish Reddy
 
PPTX
pl/sql Procedure
Pooja Dixit
 
PDF
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
Managing input and output operations in c
niyamathShariff
 
Compiler unit 1
BBDITM LUCKNOW
 
Access modifiers in java
Sourabrata Mukherjee
 
Operators and expressions in c language
tanmaymodi4
 
6 operators-in-c
Rohit Shrivastava
 
Data types in c++
Venkata.Manish Reddy
 
pl/sql Procedure
Pooja Dixit
 
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 

What's hot (20)

PPTX
Exception handling c++
Jayant Dalvi
 
PPTX
Static Data Members and Member Functions
MOHIT AGARWAL
 
PDF
c++ lab manual
Shrunkhala Wankhede
 
PPTX
Java Final Keyword
Ducat India
 
PPTX
Java program structure
Mukund Kumar Bharti
 
PPTX
C formatted and unformatted input and output constructs
GopikaS12
 
PDF
Programación Funcional 101 con Scala y ZIO 2.0
Jorge Vásquez
 
PDF
Introduction to data structure
Zaid Shabbir
 
PPTX
Advantages of java
xxx007008
 
PPTX
Function C programming
Appili Vamsi Krishna
 
PPTX
Managing input and output operation in c
yazad dumasia
 
PDF
LinkedList vs ArrayList in Java | Edureka
Edureka!
 
PPTX
JRE , JDK and platform independent nature of JAVA
Mehak Tawakley
 
PPT
File handling in c
David Livingston J
 
PPTX
Static Members-Java.pptx
ADDAGIRIVENKATARAVIC
 
PPT
OOP in C++
ppd1961
 
PPTX
Ingeniería de software (la importancia del software)
ARLEYDURAN
 
PPT
1 - Introduction to PL/SQL
rehaniltifat
 
PPTX
Functions in c
kalavathisugan
 
Exception handling c++
Jayant Dalvi
 
Static Data Members and Member Functions
MOHIT AGARWAL
 
c++ lab manual
Shrunkhala Wankhede
 
Java Final Keyword
Ducat India
 
Java program structure
Mukund Kumar Bharti
 
C formatted and unformatted input and output constructs
GopikaS12
 
Programación Funcional 101 con Scala y ZIO 2.0
Jorge Vásquez
 
Introduction to data structure
Zaid Shabbir
 
Advantages of java
xxx007008
 
Function C programming
Appili Vamsi Krishna
 
Managing input and output operation in c
yazad dumasia
 
LinkedList vs ArrayList in Java | Edureka
Edureka!
 
JRE , JDK and platform independent nature of JAVA
Mehak Tawakley
 
File handling in c
David Livingston J
 
Static Members-Java.pptx
ADDAGIRIVENKATARAVIC
 
OOP in C++
ppd1961
 
Ingeniería de software (la importancia del software)
ARLEYDURAN
 
1 - Introduction to PL/SQL
rehaniltifat
 
Functions in c
kalavathisugan
 
Ad

Similar to ppt on logical/arthimatical/conditional operators (20)

PPTX
OPERATORS OF C++
ANANT VYAS
 
PPTX
operators.pptx
ruchisuru20001
 
PDF
Operators in c programming
savitamhaske
 
PPT
Operators in C Programming
programming9
 
PPTX
C Operators
Yash Modi
 
DOCX
C – operators and expressions
Chukka Nikhil Chakravarthy
 
PPTX
C PRESENTATION.pptx
VAIBHAV175947
 
PPT
Operators in Computer programming presentation
GayathriShiva4
 
PPTX
operatorsincprogramming-190221094522.pptx
ShirishaBuduputi
 
PPTX
Operators and it's type
Asheesh kushwaha
 
PDF
Types of Operators in C programming .pdf
RichardMathengeSPASP
 
PDF
C Operators and Control Structures.pdf
MaryJacob24
 
PPTX
C operators
AbiramiT9
 
PPTX
Operators inc c language
Tanmay Modi
 
PPTX
Expressions using operator in c
Saranya saran
 
PDF
Unit ii chapter 1 operator and expressions in c
Sowmya Jyothi
 
PPTX
Operators in C/C++
Shobi P P
 
DOCX
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
Sitamarhi Institute of Technology
 
PPTX
C operators
Rupanshi rawat
 
PPTX
Cse lecture-4.1-c operators and expression
FarshidKhan
 
OPERATORS OF C++
ANANT VYAS
 
operators.pptx
ruchisuru20001
 
Operators in c programming
savitamhaske
 
Operators in C Programming
programming9
 
C Operators
Yash Modi
 
C – operators and expressions
Chukka Nikhil Chakravarthy
 
C PRESENTATION.pptx
VAIBHAV175947
 
Operators in Computer programming presentation
GayathriShiva4
 
operatorsincprogramming-190221094522.pptx
ShirishaBuduputi
 
Operators and it's type
Asheesh kushwaha
 
Types of Operators in C programming .pdf
RichardMathengeSPASP
 
C Operators and Control Structures.pdf
MaryJacob24
 
C operators
AbiramiT9
 
Operators inc c language
Tanmay Modi
 
Expressions using operator in c
Saranya saran
 
Unit ii chapter 1 operator and expressions in c
Sowmya Jyothi
 
Operators in C/C++
Shobi P P
 
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
Sitamarhi Institute of Technology
 
C operators
Rupanshi rawat
 
Cse lecture-4.1-c operators and expression
FarshidKhan
 
Ad

Recently uploaded (20)

PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
DOCX
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
PPTX
TestNG for Java Testing and Automation testing
ssuser0213cb
 
PPTX
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Become an Agentblazer Champion Challenge
Dele Amefo
 
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
TestNG for Java Testing and Automation testing
ssuser0213cb
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Activate_Methodology_Summary presentatio
annapureddyn
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Become an Agentblazer Champion Challenge
Dele Amefo
 
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
oapresentation.pptx
mehatdhavalrajubhai
 

ppt on logical/arthimatical/conditional operators

  • 1. Introduction To C Programming PRESENTATION BY AMRINDER PAL SINGH(BCA 1-EVENING)
  • 2. Operators In C  There Are Following Types FO]]Of Operators In C Such A:  Arithmetic Operators  Relational Operators  Logical Operators  Conditional Operators  Assignment Opertors  Increment/Decrements Operators  Bitwise Operators  Special Operators
  • 3. Arithmetic Operators  What Are Arithmetic Operators?  Arithmetic Operators Are Those Operators Which Are Used To Perform Arithmetical/Mathematical Operations In C.  Examples Are:  +(Plus) Used For Addition  -(Minus) Used For Subtraction  *(Multiply) Used For Multiplication  /(Divide) Used For Division  %(Modulus) Used For Modulation Or Finding Of remainder
  • 4. Arithmetic Operators  Syntax: #include<stdio.h> void main() {int a, b, c; // This Program Is used For Addition process printf(“Enter Two Numbers:n”); scanf(“%d,%d”,&a,&b); c=a+b; printf(“Answer Is %d”,c); }
  • 5. Arithmetic Operators  Output Enter Two Numbers: 2, 4 Answer Is 6
  • 6. Logical Operators  What Are Logical Operators?  These Operators Are Used To Test One Or More Conditions(Or To Perform Logical operations)  Examples  “&&” Logical And If both the operands are non-zero, then the condition becomes true  “||” Logical OR If any of the two operands is non-zero, then the condition becomes true.  ! Logical Not If a condition is true, then Logical NOT operator will make it false.
  • 7. Logical Operators  Syntax  #include <stdio.h> void main() { int a = 5, b = 20, c ; if ( a && b ) { printf("Line 1 - Condition is truen" ); } if ( a || b ) { printf("Line 2 - Condition is truen" ); }
  • 8. Logical Operators  /* lets change the value of a and b */ a = 0; b = 10; if ( a && b ) { printf("Line 3 - Condition is truen" ); } else { printf("Line 3 - Condition is not truen" ); } if ( !(a && b) ) { printf("Line 4 - Condition is truen" ); } }
  • 9. Logical operators  Output Line 1 - Condition is true Line 2 - Condition is true Line 3 - Condition is not true Line 4 - Condition is true
  • 10. Conditional Operators  What Are Conditional Operators?  Conditional Operators Is A Turnary Operators Which Is A Set Off 2 Symbols Or Operators.  Examples  (x>y)?prinft(“%d”,x):(“%d”,y);
  • 11. Conditional Operators  Syntax  #include<stdio.h> void main() { int a, b; printf(“Enter Two Number:n”); scanf(“%d”,&a,&b); (a>b)?printf(“%d Is Greater”,x):printf(“%d Is greater”,y); }
  • 12. Conditional Operators  Output Enter two numbers: 22, 55 55 Is Greater