SlideShare a Scribd company logo
1 of 15
NAME :- SOUVAGYA BERA
STUDENT CODE :- BWU/BCA/22/043
PROGRAM :- BCA
SEMISTER :-1ST
SEC :- A (G-2)
GUIDED BY :- PAMPA SAHA
VARIOUS TYPES OF OPERATOR
VARIOUS TYPE OF OPERATOR
1. Arithmetic operator (+, -, *, /, //, **)
2. Relational operator (<, <=,>,>=, ==, !=)
3. Logical operator (and, or, not)
4. Bitwise operator
 a) & =bitwise and
 b) l =bitwise or
 c) ^ =bitwise XOR
 d) ~ =bitwise complement
 e)>> =bitwise shift right
 f)<< =bitwise shift left
 5. Assignment operator (=)
 6. Special operator
 a) Identity operator (is, is not)
 b) Membership operator (in, not in)
1. EXAMPLE OF ARITHMETTIC OPERATOR
 a=13
 b=2
 print(a+b)
 print(a-b)
 print(a*b)
 print(a/b)
 print(a//b)
 print(a**b)
OUTPUT
2. EXAMPLE OF RELATIONAL OPERATOR
 a=13
 b=2
 print(a<b)
 print(a>b)
 print(a<=b)
 print(a>=b)
 print(a==b)
 print(a!=b)
OUTPUT
3. EXAMPLE OF LOGICAL OPERATOR
 a=13
 b=2
 print(a<b and a>b)
 print(a>b or a<b)
 print(not(a<b and a>b))
OUTPUT
4. BITWISE OPERATOR
a) Bitwise and
Int main() {
Int a = 12, b =25;
Printf(“output = %d”, a & b);
Return 0;
}
OUTPUT
b) Bitwise or
Int main() {
int a =12, b =25;
Printf(“output =%d”, a|b);
Return 0;
}
OUTPUT
c) Bitwise XOR
Int main() {
int a =12, b =25;
Printf(“output =%d”, a ^ b);
Return 0;
}
OUTPUT
d) Bitwise complement
Int main() {
printf(“output = %dn”, ~35);
Printf(“output = %dn”, ~-12);
Return 0;
}
OUTPUT
e) Bitwise shift right & left
int main() {
int num= 212, i;
for (i = 0; i <= 2; ++i) {
printf(“right shift by %d: %dn”, i, num >> i);
}
Printf(“n”);
for (i = 0; i <= 2; ++i) {
printf(“left shift by %d: %dn”, i, num << i);
}
Return 0;
}
OUTPUT
5. EXAMPLE OF ASSIGNMENT OPERATOR
 NAME=(“SOUVAGYA BERA”)
 Print(NAME)
OUTPUT
6. SPECIAL OPERATOR
A . EXAMPLE OF IDENTITY OPERATOR
 al =5
 bl =5
 a2 ="hello"
 b2 ="hello"
 a3 =[1,2,3]
 b3 =[1,2,3]
 print(al is not bl)
 print(a2 is b2)
 print(a2 is b3)
OUTPUT
B. EXAMPLE OF MEMBERSHIP OPERATOR
a= “hello world”
b= “{1,"a","b",2}”
Print("H" in a)
Print("hello" in a)
Print(1 in b)
Print("b" in b)
Print("c" not in b)
OUTPUT
THANK YOU

More Related Content

Similar to ppt1s.pptx

PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptx
Nithya K
 
Lect08 exercises
Lect08 exercisesLect08 exercises
Lect08 exercises
AKalaji
 

Similar to ppt1s.pptx (20)

ppt on logical/arthimatical/conditional operators
ppt on logical/arthimatical/conditional operatorsppt on logical/arthimatical/conditional operators
ppt on logical/arthimatical/conditional operators
 
PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptx
 
C programing basic input and output
C  programing basic input and outputC  programing basic input and output
C programing basic input and output
 
COM1407: C Operators
COM1407: C OperatorsCOM1407: C Operators
COM1407: C Operators
 
Let us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solutionLet us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solution
 
C언어 스터디 강의자료 - 1차시
C언어 스터디 강의자료 - 1차시C언어 스터디 강의자료 - 1차시
C언어 스터디 강의자료 - 1차시
 
Week 5
Week 5Week 5
Week 5
 
C operators
C operators C operators
C operators
 
Lect08 exercises
Lect08 exercisesLect08 exercises
Lect08 exercises
 
#2
#2#2
#2
 
Closures
ClosuresClosures
Closures
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
C lab programs
C lab programsC lab programs
C lab programs
 
C lab programs
C lab programsC lab programs
C lab programs
 
C PROGRAMS
C PROGRAMSC PROGRAMS
C PROGRAMS
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Transport in india
Transport in indiaTransport in india
Transport in india
 
F(2)
F(2)F(2)
F(2)
 
Cpl
CplCpl
Cpl
 
Theory3
Theory3Theory3
Theory3
 

Recently uploaded

Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh +966572737505 get cytotec
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
zifhagzkk
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
wsppdmt
 
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get CytotecAbortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
23050636
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
wsppdmt
 
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
mikehavy0
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
saurabvyas476
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
yulianti213969
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 

Recently uploaded (20)

Bios of leading Astrologers & Researchers
Bios of leading Astrologers & ResearchersBios of leading Astrologers & Researchers
Bios of leading Astrologers & Researchers
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
 
Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshare
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
 
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get CytotecAbortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
 
DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
DS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .pptDS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .ppt
 
Introduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxIntroduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptx
 
ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...
ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...
ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...
 
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 

ppt1s.pptx

  • 1. NAME :- SOUVAGYA BERA STUDENT CODE :- BWU/BCA/22/043 PROGRAM :- BCA SEMISTER :-1ST SEC :- A (G-2) GUIDED BY :- PAMPA SAHA VARIOUS TYPES OF OPERATOR
  • 2. VARIOUS TYPE OF OPERATOR 1. Arithmetic operator (+, -, *, /, //, **) 2. Relational operator (<, <=,>,>=, ==, !=) 3. Logical operator (and, or, not) 4. Bitwise operator  a) & =bitwise and  b) l =bitwise or  c) ^ =bitwise XOR  d) ~ =bitwise complement  e)>> =bitwise shift right  f)<< =bitwise shift left  5. Assignment operator (=)
  • 3.  6. Special operator  a) Identity operator (is, is not)  b) Membership operator (in, not in)
  • 4. 1. EXAMPLE OF ARITHMETTIC OPERATOR  a=13  b=2  print(a+b)  print(a-b)  print(a*b)  print(a/b)  print(a//b)  print(a**b) OUTPUT
  • 5. 2. EXAMPLE OF RELATIONAL OPERATOR  a=13  b=2  print(a<b)  print(a>b)  print(a<=b)  print(a>=b)  print(a==b)  print(a!=b) OUTPUT
  • 6. 3. EXAMPLE OF LOGICAL OPERATOR  a=13  b=2  print(a<b and a>b)  print(a>b or a<b)  print(not(a<b and a>b)) OUTPUT
  • 7. 4. BITWISE OPERATOR a) Bitwise and Int main() { Int a = 12, b =25; Printf(“output = %d”, a & b); Return 0; } OUTPUT
  • 8. b) Bitwise or Int main() { int a =12, b =25; Printf(“output =%d”, a|b); Return 0; } OUTPUT
  • 9. c) Bitwise XOR Int main() { int a =12, b =25; Printf(“output =%d”, a ^ b); Return 0; } OUTPUT
  • 10. d) Bitwise complement Int main() { printf(“output = %dn”, ~35); Printf(“output = %dn”, ~-12); Return 0; } OUTPUT
  • 11. e) Bitwise shift right & left int main() { int num= 212, i; for (i = 0; i <= 2; ++i) { printf(“right shift by %d: %dn”, i, num >> i); } Printf(“n”); for (i = 0; i <= 2; ++i) { printf(“left shift by %d: %dn”, i, num << i); } Return 0; } OUTPUT
  • 12. 5. EXAMPLE OF ASSIGNMENT OPERATOR  NAME=(“SOUVAGYA BERA”)  Print(NAME) OUTPUT
  • 13. 6. SPECIAL OPERATOR A . EXAMPLE OF IDENTITY OPERATOR  al =5  bl =5  a2 ="hello"  b2 ="hello"  a3 =[1,2,3]  b3 =[1,2,3]  print(al is not bl)  print(a2 is b2)  print(a2 is b3) OUTPUT
  • 14. B. EXAMPLE OF MEMBERSHIP OPERATOR a= “hello world” b= “{1,"a","b",2}” Print("H" in a) Print("hello" in a) Print(1 in b) Print("b" in b) Print("c" not in b) OUTPUT