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
Logical and Conditional Operator In C language
PPT
Arithmetic operator
PPTX
Operators and expressions in C++
PDF
Relational algebra in dbms
PPT
MYSQL.ppt
PPTX
Java Methods
PPTX
Programming process and flowchart
PPTX
SQL Functions
Logical and Conditional Operator In C language
Arithmetic operator
Operators and expressions in C++
Relational algebra in dbms
MYSQL.ppt
Java Methods
Programming process and flowchart
SQL Functions

What's hot (20)

PDF
Operators in python
PPTX
Data Representation
PPTX
C++ Pointers
PPTX
SQL Operators.pptx
PDF
Hash tables and hash maps in python | Edureka
PPT
Operator precedence and associativity
PPT
Memory Addressing
PPT
Introduction to Enzymes
DOCX
Ternary operator
PPTX
Relational Algebra,Types of join
PPTX
Lexical analysis - Compiler Design
PPTX
Operators in c++
PPTX
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...
PPTX
Type Conversion, Precedence and Associativity
PPT
Code Optimization
PDF
Managing I/O operations In C- Language
PPTX
OPERATORS OF C++
PPTX
Three address code In Compiler Design
PDF
Java variable types
PPT
ER-Model-ER Diagram
Operators in python
Data Representation
C++ Pointers
SQL Operators.pptx
Hash tables and hash maps in python | Edureka
Operator precedence and associativity
Memory Addressing
Introduction to Enzymes
Ternary operator
Relational Algebra,Types of join
Lexical analysis - Compiler Design
Operators in c++
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...
Type Conversion, Precedence and Associativity
Code Optimization
Managing I/O operations In C- Language
OPERATORS OF C++
Three address code In Compiler Design
Java variable types
ER-Model-ER Diagram
Ad

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

PPTX
operators.pptx
PDF
Operators in c programming
PPT
Operators in C Programming
PPTX
C Operators
DOCX
C – operators and expressions
PPTX
C PRESENTATION.pptx
PPT
Operators in Computer programming presentation
PPTX
operatorsincprogramming-190221094522.pptx
PPTX
Operators and it's type
PDF
Types of Operators in C programming .pdf
PDF
C Operators and Control Structures.pdf
PPTX
C operators
PPTX
Operators and expressions in c language
PPTX
Operators inc c language
PPTX
Expressions using operator in c
PDF
Unit ii chapter 1 operator and expressions in c
PPTX
Operators in C/C++
DOCX
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
PPTX
C operators
PPTX
Cse lecture-4.1-c operators and expression
operators.pptx
Operators in c programming
Operators in C Programming
C Operators
C – operators and expressions
C PRESENTATION.pptx
Operators in Computer programming presentation
operatorsincprogramming-190221094522.pptx
Operators and it's type
Types of Operators in C programming .pdf
C Operators and Control Structures.pdf
C operators
Operators and expressions in c language
Operators inc c language
Expressions using operator in c
Unit ii chapter 1 operator and expressions in c
Operators in C/C++
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
C operators
Cse lecture-4.1-c operators and expression
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PDF
AI in Product Development-omnex systems
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
System and Network Administraation Chapter 3
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
medical staffing services at VALiNTRY
PDF
Digital Strategies for Manufacturing Companies
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Nekopoi APK 2025 free lastest update
AI in Product Development-omnex systems
How to Migrate SBCGlobal Email to Yahoo Easily
How Creative Agencies Leverage Project Management Software.pdf
L1 - Introduction to python Backend.pptx
System and Network Administraation Chapter 3
How to Choose the Right IT Partner for Your Business in Malaysia
Design an Analysis of Algorithms I-SECS-1021-03
medical staffing services at VALiNTRY
Digital Strategies for Manufacturing Companies
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Odoo POS Development Services by CandidRoot Solutions
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Upgrade and Innovation Strategies for SAP ERP Customers
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

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