%in ivory park+277-882-255-28 abortion pills for sale in ivory park
Â
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);
}
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);
}