SlideShare a Scribd company logo
1 of 18
Lecture 15Lecture 15
Version 1.0Version 1.0
Pointers and ArraysPointers and Arrays
2Rushdi Shams, Dept of CSE, KUET, Bangladesh
Passing Array Elements to FunctionsPassing Array Elements to Functions
 Array elements can be passed to a function byArray elements can be passed to a function by
calling the function by value, or by referencecalling the function by value, or by reference
 In the call by value we pass values of arrayIn the call by value we pass values of array
elements to the functionelements to the function
 in the call by reference we pass addresses ofin the call by reference we pass addresses of
array elements to the functionarray elements to the function
3Rushdi Shams, Dept of CSE, KUET, Bangladesh
Passing Array Elements toPassing Array Elements to
Functions: Call by valueFunctions: Call by value
4Rushdi Shams, Dept of CSE, KUET, Bangladesh
Passing Array Elements toPassing Array Elements to
Functions: Call by referenceFunctions: Call by reference
5Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointer ArithmeticPointer Arithmetic
6Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointer ArithmeticPointer Arithmetic
 Addition of a number to a pointerAddition of a number to a pointer
7Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointer ArithmeticPointer Arithmetic
 Subtraction of a number from a pointerSubtraction of a number from a pointer
8Rushdi Shams, Dept of CSE, KUET, Bangladesh
What do we know so far?What do we know so far?
 Array elements are always stored in contiguousArray elements are always stored in contiguous
memory locations.memory locations.
 A pointer when incremented always points to anA pointer when incremented always points to an
immediately next location of its type.immediately next location of its type.
9Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointers and ArraysPointers and Arrays
10Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointer and ArrayPointer and Array
 Our next two programs show ways in which weOur next two programs show ways in which we
can access the elements of this array.can access the elements of this array.
11Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointer and ArrayPointer and Array
12Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointer and ArrayPointer and Array
13Rushdi Shams, Dept of CSE, KUET, Bangladesh
Passing entire array to functionPassing entire array to function
14Rushdi Shams, Dept of CSE, KUET, Bangladesh
Similar Statements!Similar Statements!
15Rushdi Shams, Dept of CSE, KUET, Bangladesh
Array of PointersArray of Pointers
 The way there can be an array ofThe way there can be an array of intints or an arrays or an array
ofof floatfloats, similarly there can be an array ofs, similarly there can be an array of
pointerspointers
 an array of pointers would be nothing but aan array of pointers would be nothing but a
collection of addressescollection of addresses
16Rushdi Shams, Dept of CSE, KUET, Bangladesh
Array of pointersArray of pointers
17Rushdi Shams, Dept of CSE, KUET, Bangladesh
Array of pointersArray of pointers
18Rushdi Shams, Dept of CSE, KUET, Bangladesh
Pointers to arrayPointers to array
 An array of pointers can even contain the addressesAn array of pointers can even contain the addresses
of other arraysof other arrays

More Related Content

Similar to Lec 15. Pointers and Arrays

Lec 11. One Dimensional Arrays
Lec 11. One Dimensional ArraysLec 11. One Dimensional Arrays
Lec 11. One Dimensional ArraysRushdi Shams
 
Lec 14. Call by Reference
Lec 14. Call by ReferenceLec 14. Call by Reference
Lec 14. Call by ReferenceRushdi Shams
 
L14 l15 Object Oriented DBMS
L14 l15  Object Oriented DBMSL14 l15  Object Oriented DBMS
L14 l15 Object Oriented DBMSRushdi Shams
 
Get started with R lang
Get started with R langGet started with R lang
Get started with R langsenthil0809
 
Lec 03. Arithmetic Operator / Relational Operator
Lec 03. Arithmetic Operator / Relational OperatorLec 03. Arithmetic Operator / Relational Operator
Lec 03. Arithmetic Operator / Relational OperatorRushdi Shams
 
QER : query entity recognition
QER : query entity recognitionQER : query entity recognition
QER : query entity recognitionDhwaj Raj
 
My slide relational algebra
My slide  relational algebraMy slide  relational algebra
My slide relational algebraRushdi Shams
 
Lec 08. C Data Types
Lec 08. C Data TypesLec 08. C Data Types
Lec 08. C Data TypesRushdi Shams
 
Training excel
Training  excelTraining  excel
Training excelRavi Rai
 
Lec 07. Do-While Loop / Switch
Lec 07. Do-While Loop / SwitchLec 07. Do-While Loop / Switch
Lec 07. Do-While Loop / SwitchRushdi Shams
 
L5 aggregate functions
L5  aggregate functionsL5  aggregate functions
L5 aggregate functionsRushdi Shams
 

Similar to Lec 15. Pointers and Arrays (15)

Lec 11. One Dimensional Arrays
Lec 11. One Dimensional ArraysLec 11. One Dimensional Arrays
Lec 11. One Dimensional Arrays
 
Lec 14. Call by Reference
Lec 14. Call by ReferenceLec 14. Call by Reference
Lec 14. Call by Reference
 
Programming Basics - array, loops, funcitons
Programming Basics - array, loops, funcitonsProgramming Basics - array, loops, funcitons
Programming Basics - array, loops, funcitons
 
L14 l15 Object Oriented DBMS
L14 l15  Object Oriented DBMSL14 l15  Object Oriented DBMS
L14 l15 Object Oriented DBMS
 
Get started with R lang
Get started with R langGet started with R lang
Get started with R lang
 
Lec 03. Arithmetic Operator / Relational Operator
Lec 03. Arithmetic Operator / Relational OperatorLec 03. Arithmetic Operator / Relational Operator
Lec 03. Arithmetic Operator / Relational Operator
 
Lec 16. Strings
Lec 16. StringsLec 16. Strings
Lec 16. Strings
 
QER : query entity recognition
QER : query entity recognitionQER : query entity recognition
QER : query entity recognition
 
My slide relational algebra
My slide  relational algebraMy slide  relational algebra
My slide relational algebra
 
Cg4201552556
Cg4201552556Cg4201552556
Cg4201552556
 
Lec 08. C Data Types
Lec 08. C Data TypesLec 08. C Data Types
Lec 08. C Data Types
 
Training excel
Training  excelTraining  excel
Training excel
 
Wrapper classes
Wrapper classesWrapper classes
Wrapper classes
 
Lec 07. Do-While Loop / Switch
Lec 07. Do-While Loop / SwitchLec 07. Do-While Loop / Switch
Lec 07. Do-While Loop / Switch
 
L5 aggregate functions
L5  aggregate functionsL5  aggregate functions
L5 aggregate functions
 

More from Rushdi Shams

Research Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchResearch Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchRushdi Shams
 
Common evaluation measures in NLP and IR
Common evaluation measures in NLP and IRCommon evaluation measures in NLP and IR
Common evaluation measures in NLP and IRRushdi Shams
 
Machine learning with nlp 101
Machine learning with nlp 101Machine learning with nlp 101
Machine learning with nlp 101Rushdi Shams
 
Semi-supervised classification for natural language processing
Semi-supervised classification for natural language processingSemi-supervised classification for natural language processing
Semi-supervised classification for natural language processingRushdi Shams
 
Natural Language Processing: Parsing
Natural Language Processing: ParsingNatural Language Processing: Parsing
Natural Language Processing: ParsingRushdi Shams
 
Types of machine translation
Types of machine translationTypes of machine translation
Types of machine translationRushdi Shams
 
L1 l2 l3 introduction to machine translation
L1 l2 l3  introduction to machine translationL1 l2 l3  introduction to machine translation
L1 l2 l3 introduction to machine translationRushdi Shams
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semanticsRushdi Shams
 
Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 
Knowledge structure
Knowledge structureKnowledge structure
Knowledge structureRushdi Shams
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representationRushdi Shams
 
L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hackingRushdi Shams
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)Rushdi Shams
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process modelsRushdi Shams
 

More from Rushdi Shams (20)

Research Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchResearch Methodology and Tips on Better Research
Research Methodology and Tips on Better Research
 
Common evaluation measures in NLP and IR
Common evaluation measures in NLP and IRCommon evaluation measures in NLP and IR
Common evaluation measures in NLP and IR
 
Machine learning with nlp 101
Machine learning with nlp 101Machine learning with nlp 101
Machine learning with nlp 101
 
Semi-supervised classification for natural language processing
Semi-supervised classification for natural language processingSemi-supervised classification for natural language processing
Semi-supervised classification for natural language processing
 
Natural Language Processing: Parsing
Natural Language Processing: ParsingNatural Language Processing: Parsing
Natural Language Processing: Parsing
 
Types of machine translation
Types of machine translationTypes of machine translation
Types of machine translation
 
L1 l2 l3 introduction to machine translation
L1 l2 l3  introduction to machine translationL1 l2 l3  introduction to machine translation
L1 l2 l3 introduction to machine translation
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semantics
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
L15 fuzzy logic
L15  fuzzy logicL15  fuzzy logic
L15 fuzzy logic
 
Knowledge structure
Knowledge structureKnowledge structure
Knowledge structure
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
First order logic
First order logicFirst order logic
First order logic
 
Belief function
Belief functionBelief function
Belief function
 
L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hacking
 
L4 vpn
L4  vpnL4  vpn
L4 vpn
 
L3 defense
L3  defenseL3  defense
L3 defense
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)
 
L1 phishing
L1  phishingL1  phishing
L1 phishing
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process models
 

Recently uploaded

Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 

Lec 15. Pointers and Arrays

  • 1. Lecture 15Lecture 15 Version 1.0Version 1.0 Pointers and ArraysPointers and Arrays
  • 2. 2Rushdi Shams, Dept of CSE, KUET, Bangladesh Passing Array Elements to FunctionsPassing Array Elements to Functions  Array elements can be passed to a function byArray elements can be passed to a function by calling the function by value, or by referencecalling the function by value, or by reference  In the call by value we pass values of arrayIn the call by value we pass values of array elements to the functionelements to the function  in the call by reference we pass addresses ofin the call by reference we pass addresses of array elements to the functionarray elements to the function
  • 3. 3Rushdi Shams, Dept of CSE, KUET, Bangladesh Passing Array Elements toPassing Array Elements to Functions: Call by valueFunctions: Call by value
  • 4. 4Rushdi Shams, Dept of CSE, KUET, Bangladesh Passing Array Elements toPassing Array Elements to Functions: Call by referenceFunctions: Call by reference
  • 5. 5Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointer ArithmeticPointer Arithmetic
  • 6. 6Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointer ArithmeticPointer Arithmetic  Addition of a number to a pointerAddition of a number to a pointer
  • 7. 7Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointer ArithmeticPointer Arithmetic  Subtraction of a number from a pointerSubtraction of a number from a pointer
  • 8. 8Rushdi Shams, Dept of CSE, KUET, Bangladesh What do we know so far?What do we know so far?  Array elements are always stored in contiguousArray elements are always stored in contiguous memory locations.memory locations.  A pointer when incremented always points to anA pointer when incremented always points to an immediately next location of its type.immediately next location of its type.
  • 9. 9Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointers and ArraysPointers and Arrays
  • 10. 10Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointer and ArrayPointer and Array  Our next two programs show ways in which weOur next two programs show ways in which we can access the elements of this array.can access the elements of this array.
  • 11. 11Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointer and ArrayPointer and Array
  • 12. 12Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointer and ArrayPointer and Array
  • 13. 13Rushdi Shams, Dept of CSE, KUET, Bangladesh Passing entire array to functionPassing entire array to function
  • 14. 14Rushdi Shams, Dept of CSE, KUET, Bangladesh Similar Statements!Similar Statements!
  • 15. 15Rushdi Shams, Dept of CSE, KUET, Bangladesh Array of PointersArray of Pointers  The way there can be an array ofThe way there can be an array of intints or an arrays or an array ofof floatfloats, similarly there can be an array ofs, similarly there can be an array of pointerspointers  an array of pointers would be nothing but aan array of pointers would be nothing but a collection of addressescollection of addresses
  • 16. 16Rushdi Shams, Dept of CSE, KUET, Bangladesh Array of pointersArray of pointers
  • 17. 17Rushdi Shams, Dept of CSE, KUET, Bangladesh Array of pointersArray of pointers
  • 18. 18Rushdi Shams, Dept of CSE, KUET, Bangladesh Pointers to arrayPointers to array  An array of pointers can even contain the addressesAn array of pointers can even contain the addresses of other arraysof other arrays