SlideShare a Scribd company logo
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
int *p;
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
p++; / p--;
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
int *p;
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
p++; / p--;
addr(p+i) = addr(p) + (sizeof(T)* i)
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
int *p;
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
p = p+3;
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
int *p;
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
p = p+3;
addr(p+i) = addr(p) + (sizeof(T)* i)
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
int *p;
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
p = p-3;
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
int *p;
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
p = p-3;
addr(p+i) = addr(p) - (sizeof(T)* i)
 Increment/Decrement of a Pointer
 Addition of integer to a pointer
Subtraction of integer to a pointer
int
*p1,*p2;
 Subtraction of integer to a pointer
 Subtracting two pointers of the same type
p1 – p2
7. Pointer Arithmetic

More Related Content

What's hot

computer notes - Data Structures - 26
computer notes - Data Structures - 26computer notes - Data Structures - 26
computer notes - Data Structures - 26ecomputernotes
 
Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)
SHAMJITH KM
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
vikas dhakane
 
Python Lab manual program for BE First semester (all department
Python Lab manual program for BE First semester (all departmentPython Lab manual program for BE First semester (all department
Python Lab manual program for BE First semester (all department
Nazeer Wahab
 
ML: A Strongly Typed Functional Language
ML: A Strongly Typed Functional LanguageML: A Strongly Typed Functional Language
ML: A Strongly Typed Functional Languagelijx127
 
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
AKSHAY SACHAN
 
Mettl prg
Mettl prgMettl prg
Mettl prg
RajSingh734307
 
Pslb lab manual
Pslb lab manualPslb lab manual
Pslb lab manual
Vivek Kumar Sinha
 
Code Optimization in MIPS
Code Optimization in MIPSCode Optimization in MIPS
Code Optimization in MIPS
Ahsan Javed
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-arrayDeepak Singh
 
Compiling fµn language
Compiling fµn languageCompiling fµn language
Compiling fµn language
Didier Plaindoux
 
C- Programming Assignment 3
C- Programming Assignment 3C- Programming Assignment 3
C- Programming Assignment 3
Animesh Chaturvedi
 
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Lab manualsahu[et&t]
Lab manualsahu[et&t]Lab manualsahu[et&t]
Lab manualsahu[et&t]
Vivek Kumar Sinha
 
201506 CSE340 Lecture 15
201506 CSE340 Lecture 15201506 CSE340 Lecture 15
201506 CSE340 Lecture 15
Javier Gonzalez-Sanchez
 
Mini project title prime number generator
Mini project title prime number generatorMini project title prime number generator
Mini project title prime number generator
Md. Asad Chowdhury Dipu
 
C- Programming Assignment 4 solution
C- Programming Assignment 4 solutionC- Programming Assignment 4 solution
C- Programming Assignment 4 solution
Animesh Chaturvedi
 

What's hot (20)

Practical no 3
Practical no 3Practical no 3
Practical no 3
 
computer notes - Data Structures - 26
computer notes - Data Structures - 26computer notes - Data Structures - 26
computer notes - Data Structures - 26
 
Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)
 
Blind os
Blind osBlind os
Blind os
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
Python Lab manual program for BE First semester (all department
Python Lab manual program for BE First semester (all departmentPython Lab manual program for BE First semester (all department
Python Lab manual program for BE First semester (all department
 
ML: A Strongly Typed Functional Language
ML: A Strongly Typed Functional LanguageML: A Strongly Typed Functional Language
ML: A Strongly Typed Functional Language
 
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
A.P.S.E PRACTICAL FILE, NIT KURUKSHETRA
 
Mettl prg
Mettl prgMettl prg
Mettl prg
 
Pslb lab manual
Pslb lab manualPslb lab manual
Pslb lab manual
 
Lab 1
Lab 1Lab 1
Lab 1
 
Code Optimization in MIPS
Code Optimization in MIPSCode Optimization in MIPS
Code Optimization in MIPS
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-array
 
Compiling fµn language
Compiling fµn languageCompiling fµn language
Compiling fµn language
 
C- Programming Assignment 3
C- Programming Assignment 3C- Programming Assignment 3
C- Programming Assignment 3
 
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
 
Lab manualsahu[et&t]
Lab manualsahu[et&t]Lab manualsahu[et&t]
Lab manualsahu[et&t]
 
201506 CSE340 Lecture 15
201506 CSE340 Lecture 15201506 CSE340 Lecture 15
201506 CSE340 Lecture 15
 
Mini project title prime number generator
Mini project title prime number generatorMini project title prime number generator
Mini project title prime number generator
 
C- Programming Assignment 4 solution
C- Programming Assignment 4 solutionC- Programming Assignment 4 solution
C- Programming Assignment 4 solution
 

Similar to 7. Pointer Arithmetic

pointers of the programming in c most efficient.pptx
pointers of the programming in c most efficient.pptxpointers of the programming in c most efficient.pptx
pointers of the programming in c most efficient.pptx
AmitRout25
 
Unit-I Pointer Data structure.pptx
Unit-I Pointer Data structure.pptxUnit-I Pointer Data structure.pptx
Unit-I Pointer Data structure.pptx
ajajkhan16
 
Pointer in C
Pointer in CPointer in C
Pointer in C
bipchulabmki
 
PPS-POINTERS.pptx
PPS-POINTERS.pptxPPS-POINTERS.pptx
PPS-POINTERS.pptx
sajinis3
 
Pointer arithmetic in c
Pointer arithmetic in c Pointer arithmetic in c
Pointer arithmetic in c
sangrampatil81
 
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdfEASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
sudhakargeruganti
 
SPC Unit 3
SPC Unit 3SPC Unit 3
SPC Unit 3
SIMONTHOMAS S
 
Pointer
PointerPointer
Pointer
saeeb12
 
Pointers in C
Pointers in CPointers in C
Pointers in C
Monishkanungo
 
Pointers
PointersPointers
Pointers
Lp Singh
 
Pointers in c++ by minal
Pointers in c++ by minalPointers in c++ by minal
Pointers in c++ by minal
minal kumar soni
 
Pointer.pptx
Pointer.pptxPointer.pptx
Pointer.pptx
SwapnaliPawar27
 
Pointers operation day2
Pointers operation day2Pointers operation day2
Pointers operation day2
Bhuvana Gowtham
 
Pointers
PointersPointers
Pointers
Vardhil Patel
 
Function Pointer
Function PointerFunction Pointer
Function Pointer
Dr-Dipali Meher
 
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Jayanshu Gundaniya
 
Pointers and single &multi dimentionalarrays.pptx
Pointers and single &multi dimentionalarrays.pptxPointers and single &multi dimentionalarrays.pptx
Pointers and single &multi dimentionalarrays.pptx
Ramakrishna Reddy Bijjam
 
Pointer introduction day1
Pointer introduction day1Pointer introduction day1
Pointer introduction day1
Bhuvana Gowtham
 

Similar to 7. Pointer Arithmetic (20)

pointers of the programming in c most efficient.pptx
pointers of the programming in c most efficient.pptxpointers of the programming in c most efficient.pptx
pointers of the programming in c most efficient.pptx
 
Unit-I Pointer Data structure.pptx
Unit-I Pointer Data structure.pptxUnit-I Pointer Data structure.pptx
Unit-I Pointer Data structure.pptx
 
Pointer in C
Pointer in CPointer in C
Pointer in C
 
PPS-POINTERS.pptx
PPS-POINTERS.pptxPPS-POINTERS.pptx
PPS-POINTERS.pptx
 
Pointer arithmetic in c
Pointer arithmetic in c Pointer arithmetic in c
Pointer arithmetic in c
 
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdfEASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
 
SPC Unit 3
SPC Unit 3SPC Unit 3
SPC Unit 3
 
Pointer
PointerPointer
Pointer
 
Pointers in C
Pointers in CPointers in C
Pointers in C
 
Pointers
PointersPointers
Pointers
 
Pointers in c++ by minal
Pointers in c++ by minalPointers in c++ by minal
Pointers in c++ by minal
 
Advanced pointers
Advanced pointersAdvanced pointers
Advanced pointers
 
Pointers+(2)
Pointers+(2)Pointers+(2)
Pointers+(2)
 
Pointer.pptx
Pointer.pptxPointer.pptx
Pointer.pptx
 
Pointers operation day2
Pointers operation day2Pointers operation day2
Pointers operation day2
 
Pointers
PointersPointers
Pointers
 
Function Pointer
Function PointerFunction Pointer
Function Pointer
 
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
Basics of pointer, pointer expressions, pointer to pointer and pointer in fun...
 
Pointers and single &multi dimentionalarrays.pptx
Pointers and single &multi dimentionalarrays.pptxPointers and single &multi dimentionalarrays.pptx
Pointers and single &multi dimentionalarrays.pptx
 
Pointer introduction day1
Pointer introduction day1Pointer introduction day1
Pointer introduction day1
 

More from Gem WeBlog

Analysis of optimization algorithms
Analysis of optimization algorithmsAnalysis of optimization algorithms
Analysis of optimization algorithms
Gem WeBlog
 
Particle swarm intelligence
Particle swarm intelligenceParticle swarm intelligence
Particle swarm intelligence
Gem WeBlog
 
Nature inspired metaheuristics
Nature inspired metaheuristicsNature inspired metaheuristics
Nature inspired metaheuristics
Gem WeBlog
 
Darwin's theory of evolution
Darwin's theory of evolutionDarwin's theory of evolution
Darwin's theory of evolution
Gem WeBlog
 
no free-lunch theorem
no free-lunch theoremno free-lunch theorem
no free-lunch theorem
Gem WeBlog
 
Video and animation
Video and animationVideo and animation
Video and animation
Gem WeBlog
 
Mpeg video compression
Mpeg video compressionMpeg video compression
Mpeg video compression
Gem WeBlog
 
Digital audio
Digital audioDigital audio
Digital audio
Gem WeBlog
 
Designing multimedia
Designing multimediaDesigning multimedia
Designing multimedia
Gem WeBlog
 
Testing and Rolling Out Enterprise Applications
Testing and Rolling Out Enterprise ApplicationsTesting and Rolling Out Enterprise Applications
Testing and Rolling Out Enterprise Applications
Gem WeBlog
 
Constructing Enterprise Applications
Constructing Enterprise  ApplicationsConstructing Enterprise  Applications
Constructing Enterprise Applications
Gem WeBlog
 
Architecting and Designing Enterprise Applications
Architecting and Designing Enterprise ApplicationsArchitecting and Designing Enterprise Applications
Architecting and Designing Enterprise Applications
Gem WeBlog
 
Incepting Enterprise Applications
Incepting Enterprise ApplicationsIncepting Enterprise Applications
Incepting Enterprise Applications
Gem WeBlog
 
Introduction to BEA
Introduction to BEAIntroduction to BEA
Introduction to BEA
Gem WeBlog
 
Pointers and Structures
Pointers and StructuresPointers and Structures
Pointers and Structures
Gem WeBlog
 
Dynamic memory allocation
Dynamic memory allocationDynamic memory allocation
Dynamic memory allocation
Gem WeBlog
 
Function pointer
Function pointerFunction pointer
Function pointer
Gem WeBlog
 
10. NULL pointer
10. NULL pointer10. NULL pointer
10. NULL pointer
Gem WeBlog
 
13. Pointer and 2D array
13. Pointer  and  2D array13. Pointer  and  2D array
13. Pointer and 2D array
Gem WeBlog
 
12.string and pointer
12.string and pointer12.string and pointer
12.string and pointer
Gem WeBlog
 

More from Gem WeBlog (20)

Analysis of optimization algorithms
Analysis of optimization algorithmsAnalysis of optimization algorithms
Analysis of optimization algorithms
 
Particle swarm intelligence
Particle swarm intelligenceParticle swarm intelligence
Particle swarm intelligence
 
Nature inspired metaheuristics
Nature inspired metaheuristicsNature inspired metaheuristics
Nature inspired metaheuristics
 
Darwin's theory of evolution
Darwin's theory of evolutionDarwin's theory of evolution
Darwin's theory of evolution
 
no free-lunch theorem
no free-lunch theoremno free-lunch theorem
no free-lunch theorem
 
Video and animation
Video and animationVideo and animation
Video and animation
 
Mpeg video compression
Mpeg video compressionMpeg video compression
Mpeg video compression
 
Digital audio
Digital audioDigital audio
Digital audio
 
Designing multimedia
Designing multimediaDesigning multimedia
Designing multimedia
 
Testing and Rolling Out Enterprise Applications
Testing and Rolling Out Enterprise ApplicationsTesting and Rolling Out Enterprise Applications
Testing and Rolling Out Enterprise Applications
 
Constructing Enterprise Applications
Constructing Enterprise  ApplicationsConstructing Enterprise  Applications
Constructing Enterprise Applications
 
Architecting and Designing Enterprise Applications
Architecting and Designing Enterprise ApplicationsArchitecting and Designing Enterprise Applications
Architecting and Designing Enterprise Applications
 
Incepting Enterprise Applications
Incepting Enterprise ApplicationsIncepting Enterprise Applications
Incepting Enterprise Applications
 
Introduction to BEA
Introduction to BEAIntroduction to BEA
Introduction to BEA
 
Pointers and Structures
Pointers and StructuresPointers and Structures
Pointers and Structures
 
Dynamic memory allocation
Dynamic memory allocationDynamic memory allocation
Dynamic memory allocation
 
Function pointer
Function pointerFunction pointer
Function pointer
 
10. NULL pointer
10. NULL pointer10. NULL pointer
10. NULL pointer
 
13. Pointer and 2D array
13. Pointer  and  2D array13. Pointer  and  2D array
13. Pointer and 2D array
 
12.string and pointer
12.string and pointer12.string and pointer
12.string and pointer
 

Recently uploaded

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 

Recently uploaded (20)

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 

7. Pointer Arithmetic

  • 1.
  • 2.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer  Subtraction of integer to a pointer  Subtracting two pointers of the same type
  • 3.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer int *p;  Subtraction of integer to a pointer  Subtracting two pointers of the same type p++; / p--;
  • 4.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer int *p;  Subtraction of integer to a pointer  Subtracting two pointers of the same type p++; / p--; addr(p+i) = addr(p) + (sizeof(T)* i)
  • 5.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer int *p;  Subtraction of integer to a pointer  Subtracting two pointers of the same type p = p+3;
  • 6.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer int *p;  Subtraction of integer to a pointer  Subtracting two pointers of the same type p = p+3; addr(p+i) = addr(p) + (sizeof(T)* i)
  • 7.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer int *p;  Subtraction of integer to a pointer  Subtracting two pointers of the same type p = p-3;
  • 8.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer int *p;  Subtraction of integer to a pointer  Subtracting two pointers of the same type p = p-3; addr(p+i) = addr(p) - (sizeof(T)* i)
  • 9.  Increment/Decrement of a Pointer  Addition of integer to a pointer Subtraction of integer to a pointer int *p1,*p2;  Subtraction of integer to a pointer  Subtracting two pointers of the same type p1 – p2