SlideShare una empresa de Scribd logo
1 de 44
Software Development  Training Program Mr.   Zia Khan, and Mr. Zeeshan Hanif
DotNet3.5 -101 Lecture 3 Zeeshan Hanif [email_address] [email_address]
Operators ,[object Object],[object Object],[object Object],[object Object]
Unary Operators ,[object Object],[object Object],[object Object],! - + ~ -- ++
Increment and Decrement Operator The ++ and – are increment and decrement operators. The increment operator increases its operand by one; the decrement operator decreases its operand by one. -- ++
Increment and Decrement Operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Increment and Decrement Operator ,[object Object],[object Object],[object Object],[object Object],[object Object]
Examples 6 5 b  =  a++ 5 4 4 b  =  --a 5 4 5 b  =  a-- 5 6 6 b  =  ++a 5 Final value of a Final value of b Expression Initial value of a
Bitwise Inversion Operator ,[object Object],~
Bitwise Inversion Operator ,[object Object],[object Object],[object Object],[object Object],[object Object]
Bitwise Inversion Operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bitwise Inversion Operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Boolean Complement Operator ,[object Object],[object Object],[object Object],!
Binary Operators ,[object Object],[object Object],[object Object],Arithmetic Operators - + % / *
Binary Operators Comparison Operator Bitwise Operators Short Circuit Logical Operators | ^ & as is != == >= > <= < || &&
Binary Operators Assignment Operators ^= & = -= += % = /= *= =
Arithmetic Operators ,[object Object],- + % / *
Comparison Operator ,[object Object],as is != == >= > <= <
Comparison Operator Less than or equal to <= Greater than or equal to >= Less than <  Greater than >  Not equal to != Equal to == Result Operator
Bitwise Operator ,[object Object],| ^ &
Bitwise Operator (&) ,[object Object],1 1 0 0 Op1 1 1 0 0 0 1 0 0 Op1  AND  Op2 Op2
Bitwise Operator (|) ,[object Object],1 1 0 0 Op1 1 1 1 0 1 1 0 0 Op1  OR  Op2 Op2
Bitwise Operator (^) ,[object Object],1 1 0 0 Op1 0 1 1 0 1 1 0 0 Op1  XOR  Op2 Op2
Bitwise Operator ,[object Object]
Bitwise Operator (&) ,[object Object],true true false false Op1 true true false false false true false false Op1  AND  Op2 Op2
Bitwise Operator (|) ,[object Object],true true false false Op1 true true true false true true false false Op1  OR  Op2 Op2
Bitwise Operator (^) ,[object Object],true true false false Op1 false true true false true true false false Op1  XOR  Op2 Op2
Short Circuit Logical Operators ,[object Object],[object Object],|| &&
Short Circuit Logical Operators ,[object Object],[object Object]
Example ,[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object]
Assignment Operators ^= & = -= += % = /= *= =
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ternary Operators ,[object Object],[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object],[object Object]
Operator Precedence ,[object Object]
Operator Precedence =  *=  /=  %=  +=  -=  <<=  >>=  &=  ^=  |= Assignment ?: Conditional || Conditional OR && Conditional AND | Logical OR ^ Logical XOR & Logical And ==  != Equality <  >  <=  >=  is as Relational <<  >> Shift +  - Additive *  /  % Multiplicative =  -  !  ~  ++x  --x  (T)x Unary (x)  x.y  f(x)  a[x]  x++  x--  new  typeof  sizeof  checked  unchecked Primary Operators Category
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Escape Sequences ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Math class Math.Round(4.9) is 5 Math.Round(4.2) is 4 Math.Round(4.5) is  4 Rounds a value to the nearest integer  Round(x) Math.Min(5,9) is 5 Math.Min(5,-9) is -9 Returns the smaller of two number Min(x,y) Math.Max(5,9) is 9 Math.Max(5,-9) is 5 Returns the larger of two number Max(x,y) Math.Floor(5.4) is 5 Math.Floor(5.9) is 5 Returns the largest integer less then or equal to x Floor(x) Math.Ceiling(5.4) is 6 Math.Ceiling(5.9) is 6 Returns the smallest integer greater than or equal to the x Ceiling(x) Math.Abs(-45) is 45 Math.Abs(45) is 45 Returns the absolute value of x Abs(x) Example Description Methods
Math class Math.Truncate(38.4) is 38 Math.Truncate(38.485487) is 38 Returns the integral part of x Truncate(x) Math.Sqrt(9) is 3 Math.Sqrt(5) is 2.23606797749979 Returns the square root of x Sqrt(x) Math.Pow(4.2) is 16 Returns x raised to the power y Pow(x,y) Example Description Methods
Exercise ,[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

C Programming : Arrays
C Programming : ArraysC Programming : Arrays
C Programming : ArraysGagan Deep
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functionssuthi
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structureMAHALAKSHMI P
 
Control Function - Computer Architecture
Control Function - Computer ArchitectureControl Function - Computer Architecture
Control Function - Computer ArchitectureAdeel Rasheed
 
Presentation on Logical Operators
Presentation on Logical OperatorsPresentation on Logical Operators
Presentation on Logical OperatorsSanjeev Budha
 
Data structure array
Data structure  arrayData structure  array
Data structure arrayMajidHamidAli
 
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...Umesh Kumar
 
Sparse matrices
Sparse matricesSparse matrices
Sparse matricesZain Zafar
 
Matrix multiplication
Matrix multiplicationMatrix multiplication
Matrix multiplicationBobby Bloch
 
Decision making statements in C programming
Decision making statements in C programmingDecision making statements in C programming
Decision making statements in C programmingRabin BK
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++Shobi P P
 
Bitwise Operators in C
Bitwise Operators in CBitwise Operators in C
Bitwise Operators in Cyndaravind
 

La actualidad más candente (20)

C Programming : Arrays
C Programming : ArraysC Programming : Arrays
C Programming : Arrays
 
Relational operators
Relational operatorsRelational operators
Relational operators
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functions
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structure
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Control Function - Computer Architecture
Control Function - Computer ArchitectureControl Function - Computer Architecture
Control Function - Computer Architecture
 
Presentation on Logical Operators
Presentation on Logical OperatorsPresentation on Logical Operators
Presentation on Logical Operators
 
Data structure array
Data structure  arrayData structure  array
Data structure array
 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C language
 
Branching in C
Branching in CBranching in C
Branching in C
 
Relations
RelationsRelations
Relations
 
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
PPT On Sorting And Searching Concepts In Data Structure | In Programming Lang...
 
25 bnf
25 bnf25 bnf
25 bnf
 
Sparse matrices
Sparse matricesSparse matrices
Sparse matrices
 
Matrix multiplication
Matrix multiplicationMatrix multiplication
Matrix multiplication
 
Decision making statements in C programming
Decision making statements in C programmingDecision making statements in C programming
Decision making statements in C programming
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++
 
Data Structure and Algorithm - Divide and Conquer
Data Structure and Algorithm - Divide and ConquerData Structure and Algorithm - Divide and Conquer
Data Structure and Algorithm - Divide and Conquer
 
Bitwise Operators in C
Bitwise Operators in CBitwise Operators in C
Bitwise Operators in C
 
COM1407: C Operators
COM1407: C OperatorsCOM1407: C Operators
COM1407: C Operators
 

Similar a Operators

C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)jahanullah
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++Neeru Mittal
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++bajiajugal
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++Praveen M Jigajinni
 
C++ Expressions Notes
C++ Expressions NotesC++ Expressions Notes
C++ Expressions NotesProf Ansari
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++sanya6900
 
Operators expressions-and-statements
Operators expressions-and-statementsOperators expressions-and-statements
Operators expressions-and-statementsCtOlaf
 
Operators in Python
Operators in PythonOperators in Python
Operators in PythonAnusuya123
 
This slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptxThis slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptxranaashutosh531pvt
 
Chapter 3.3
Chapter 3.3Chapter 3.3
Chapter 3.3sotlsoc
 
Project in TLE
Project in TLEProject in TLE
Project in TLEPGT_13
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c languageTanmay Modi
 

Similar a Operators (20)

C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)
 
C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
 
C++ Expressions Notes
C++ Expressions NotesC++ Expressions Notes
C++ Expressions Notes
 
Operators
OperatorsOperators
Operators
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 
Operators expressions-and-statements
Operators expressions-and-statementsOperators expressions-and-statements
Operators expressions-and-statements
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
 
This slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptxThis slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptx
 
Chapter 3.3
Chapter 3.3Chapter 3.3
Chapter 3.3
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
Project in TLE
Project in TLEProject in TLE
Project in TLE
 
6 operators-in-c
6 operators-in-c6 operators-in-c
6 operators-in-c
 
6 operators-in-c
6 operators-in-c6 operators-in-c
6 operators-in-c
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c language
 
C++
C++ C++
C++
 
05 operators
05   operators05   operators
05 operators
 
C language basics
C language basicsC language basics
C language basics
 

Más de Kamran

History
HistoryHistory
HistoryKamran
 
Introduction
IntroductionIntroduction
IntroductionKamran
 
Chapter3
Chapter3Chapter3
Chapter3Kamran
 
C chap02
C chap02C chap02
C chap02Kamran
 
C introduction
C introductionC introduction
C introductionKamran
 
C intro
C introC intro
C introKamran
 

Más de Kamran (7)

History
HistoryHistory
History
 
Loops
LoopsLoops
Loops
 
Introduction
IntroductionIntroduction
Introduction
 
Chapter3
Chapter3Chapter3
Chapter3
 
C chap02
C chap02C chap02
C chap02
 
C introduction
C introductionC introduction
C introduction
 
C intro
C introC intro
C intro
 

Último

Planetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifePlanetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifeBhavana Pujan Kendra
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsKnowledgeSeed
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfASGITConsulting
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfJamesConcepcion7
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxmbikashkanyari
 
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOnemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOne Monitar
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsIndiaMART InterMESH Limited
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfShashank Mehta
 
Driving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon HarmerDriving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon HarmerAggregage
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Americas Got Grants
 
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryEffective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryWhittensFineJewelry1
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxRakhi Bazaar
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingrajputmeenakshi733
 
Excvation Safety for safety officers reference
Excvation Safety for safety officers referenceExcvation Safety for safety officers reference
Excvation Safety for safety officers referencessuser2c065e
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxappkodes
 
Unveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesUnveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesDoe Paoro
 
EUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exportersEUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exportersPeter Horsten
 
WSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfWSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfJamesConcepcion7
 
14680-51-4.pdf Good quality CAS Good quality CAS
14680-51-4.pdf  Good  quality CAS Good  quality CAS14680-51-4.pdf  Good  quality CAS Good  quality CAS
14680-51-4.pdf Good quality CAS Good quality CAScathy664059
 

Último (20)

Planetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in LifePlanetary and Vedic Yagyas Bring Positive Impacts in Life
Planetary and Vedic Yagyas Bring Positive Impacts in Life
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applications
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdf
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdf
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
 
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOnemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan Dynamics
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdf
 
Driving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon HarmerDriving Business Impact for PMs with Jon Harmer
Driving Business Impact for PMs with Jon Harmer
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...
 
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold JewelryEffective Strategies for Maximizing Your Profit When Selling Gold Jewelry
Effective Strategies for Maximizing Your Profit When Selling Gold Jewelry
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
 
digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketing
 
Excvation Safety for safety officers reference
Excvation Safety for safety officers referenceExcvation Safety for safety officers reference
Excvation Safety for safety officers reference
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptx
 
Unveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesUnveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic Experiences
 
EUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exportersEUDR Info Meeting Ethiopian coffee exporters
EUDR Info Meeting Ethiopian coffee exporters
 
WSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfWSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdf
 
14680-51-4.pdf Good quality CAS Good quality CAS
14680-51-4.pdf  Good  quality CAS Good  quality CAS14680-51-4.pdf  Good  quality CAS Good  quality CAS
14680-51-4.pdf Good quality CAS Good quality CAS
 
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptxThe Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
The Bizz Quiz-E-Summit-E-Cell-IITPatna.pptx
 

Operators

  • 1. Software Development Training Program Mr. Zia Khan, and Mr. Zeeshan Hanif
  • 2. DotNet3.5 -101 Lecture 3 Zeeshan Hanif [email_address] [email_address]
  • 3.
  • 4.
  • 5. Increment and Decrement Operator The ++ and – are increment and decrement operators. The increment operator increases its operand by one; the decrement operator decreases its operand by one. -- ++
  • 6.
  • 7.
  • 8. Examples 6 5 b = a++ 5 4 4 b = --a 5 4 5 b = a-- 5 6 6 b = ++a 5 Final value of a Final value of b Expression Initial value of a
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Binary Operators Comparison Operator Bitwise Operators Short Circuit Logical Operators | ^ & as is != == >= > <= < || &&
  • 16. Binary Operators Assignment Operators ^= & = -= += % = /= *= =
  • 17.
  • 18.
  • 19. Comparison Operator Less than or equal to <= Greater than or equal to >= Less than < Greater than > Not equal to != Equal to == Result Operator
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. Assignment Operators ^= & = -= += % = /= *= =
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. Operator Precedence = *= /= %= += -= <<= >>= &= ^= |= Assignment ?: Conditional || Conditional OR && Conditional AND | Logical OR ^ Logical XOR & Logical And == != Equality < > <= >= is as Relational << >> Shift + - Additive * / % Multiplicative = - ! ~ ++x --x (T)x Unary (x) x.y f(x) a[x] x++ x-- new typeof sizeof checked unchecked Primary Operators Category
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. Math class Math.Round(4.9) is 5 Math.Round(4.2) is 4 Math.Round(4.5) is 4 Rounds a value to the nearest integer Round(x) Math.Min(5,9) is 5 Math.Min(5,-9) is -9 Returns the smaller of two number Min(x,y) Math.Max(5,9) is 9 Math.Max(5,-9) is 5 Returns the larger of two number Max(x,y) Math.Floor(5.4) is 5 Math.Floor(5.9) is 5 Returns the largest integer less then or equal to x Floor(x) Math.Ceiling(5.4) is 6 Math.Ceiling(5.9) is 6 Returns the smallest integer greater than or equal to the x Ceiling(x) Math.Abs(-45) is 45 Math.Abs(45) is 45 Returns the absolute value of x Abs(x) Example Description Methods
  • 43. Math class Math.Truncate(38.4) is 38 Math.Truncate(38.485487) is 38 Returns the integral part of x Truncate(x) Math.Sqrt(9) is 3 Math.Sqrt(5) is 2.23606797749979 Returns the square root of x Sqrt(x) Math.Pow(4.2) is 16 Returns x raised to the power y Pow(x,y) Example Description Methods
  • 44.