SlideShare a Scribd company logo
1 of 28
Chapter 5 : ARRAY 5.1 Introduction  5.2 One Dimensional Array 5.2.1 Declaring Array   5.2.2  Array Initialization   5.2.3  Array Referencing   5.2.4  Array to Function   5.3 Two Dimensional Array 5.3.1 Two Dimensional Array Declaration 5.3.2 Two Dimensional Array Initialization 5.3.3 Two Dimensional Array Referencing
5.1  Introduction ,[object Object],[object Object],[object Object],[object Object]
5.1  Introduction (Cont..) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.1  Introduction (Cont..) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2 One Dimensional Array ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.1   Declaring Array ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Array size Array name Array type
5.2.1   Declaring Array (cont).. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.1 Declaring Array (cont).. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.2 Array Initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.2 Array Initialization (cont..) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.2 Array Initialization (cont…) ,[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.3 Array Referencing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.3 Array Referencing(cont…) ,[object Object],[object Object],[object Object],Name of array ( all elements of this array, have the same name,  x ) Position number of the element within array  x “ array subscript” 4.05  3.45  3.21  6.55  10.23
5.2.3 Array Referencing(cont…)   ,[object Object],[object Object],[object Object],[object Object],[object Object],printf (“ %.f ”, Mark[0]); Mark[3] =25.0; sum= Mark[0] + Mark[1]; sum += Mark[2]; Mark[3] += 1.0; Mark[2] = Mark [0] + Mark [1]; 16.0 12.0 6.0 8.0 2.5 12.0 14.0 10.5
5.2.4  Passing Array to Function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.4  Passing Array to Function (cont..) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pass the value of  diod[2] , 4.7 to function print_third_diod Copy the value of  diod[2]   from the main function
5.2.4  Passing Array to Function (cont..) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.2.4  Passing Array to Function (cont..) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Entire array passed to  function  count_average relay[0] relay[1] relay[2] relay[3] relay[4]
5.2.4  Passing Array to Function (cont..)   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.3  Two Dimensional Array ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.3.1 Two Dimensional Array Declaration(cont..) ,[object Object],[object Object],[object Object],[object Object]
5.3.1 Two Dimensional Array Declaration(cont..) ,[object Object],[object Object],row1 row2 row3 column1  column2 column3  column4 array name row subscript column subscript row [0]-[2] column [0]-[3] exam_score[2][3] exam_score[2][2] exam_score[2][1] exam_score[2][0] exam_score[1][3] exam_score[1][2] exam_score[1][1] exam_score[1][0] exam_score[0][3] exam_score[0][2] exam_score[0][1] exam_score[0][0]
5.3.1 Two Dimensional Array Declaration(cont..) ,[object Object],[object Object],[object Object],exam_score[0][0] exam_score[0][1] exam_score[0][2] exam_score[0][3] exam_score[1][0] exam_score[1][1] exam_score[1][2] exam_score[1][3] exam_score[2][0] exam_score[2][1] exam_score[2][2] exam_score[2][3] 98 78 67 91 81 71 92 82 72 90 80 70
5.3.2 Two Dimensional Array Initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.3.2 Two Dimensional Array Initialization(cont…) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.3.2 Two Dimensional Array Initialization(cont..) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.3.3 Two Dimensional Array Referencing ,[object Object],[object Object],[object Object],[object Object],[object Object]
5.3.3 Two Dimensional Array Referencing (cont…) Example Program 5.8 #include<stdio.h> void main( ) { int exam_score[3][4]={{70,80,90,72},{82,92,71,81},{91,67,78,98}}; for(int row=0; row<3; row++) {   for(int column=0; column<4; column++){ exam_score[row][column]= exam_score[row][column]+1; printf(&quot;[%d][%d] = %d&quot;,row,column,exam_score[row][column]);   } } } //Program Output [0][0] = 71 [0][1] = 81 [0][2] = 91 [0][3] = 73 [1][0] = 83 [1][1] = 93 [1][2] = 72 [1][3] = 82 [2][0] = 92 [2][1] = 68 [2][2] = 79 [2][3] = 99

More Related Content

What's hot (20)

20.3 Java encapsulation
20.3 Java encapsulation20.3 Java encapsulation
20.3 Java encapsulation
 
Pascal tutorial
Pascal tutorialPascal tutorial
Pascal tutorial
 
Data structures & algorithms lecture 3
Data structures & algorithms lecture 3Data structures & algorithms lecture 3
Data structures & algorithms lecture 3
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 
Working with Databases and MySQL
Working with Databases and MySQLWorking with Databases and MySQL
Working with Databases and MySQL
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 
Strings In OOP(Object oriented programming)
Strings In OOP(Object oriented programming)Strings In OOP(Object oriented programming)
Strings In OOP(Object oriented programming)
 
Database connectivity in python
Database connectivity in pythonDatabase connectivity in python
Database connectivity in python
 
Lect 1-class and object
Lect 1-class and objectLect 1-class and object
Lect 1-class and object
 
Python : Data Types
Python : Data TypesPython : Data Types
Python : Data Types
 
Strings in c++
Strings in c++Strings in c++
Strings in c++
 
Arrays In C Language
Arrays In C LanguageArrays In C Language
Arrays In C Language
 
17. Java data structures trees representation and traversal
17. Java data structures trees representation and traversal17. Java data structures trees representation and traversal
17. Java data structures trees representation and traversal
 
C string
C stringC string
C string
 
SQL commands
SQL commandsSQL commands
SQL commands
 
Java and internet fundamentals.
Java and internet fundamentals.Java and internet fundamentals.
Java and internet fundamentals.
 
Mysql
MysqlMysql
Mysql
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operator
 
Java applet - java
Java applet - javaJava applet - java
Java applet - java
 
C# String
C# StringC# String
C# String
 

Viewers also liked

Selection Control Structures
Selection Control StructuresSelection Control Structures
Selection Control StructuresPRN USM
 
Ch6 pointers (latest)
Ch6 pointers (latest)Ch6 pointers (latest)
Ch6 pointers (latest)Hattori Sidek
 
BMS 5th SEM Question Paper:-Logistic & SCM
BMS 5th SEM Question Paper:-Logistic & SCMBMS 5th SEM Question Paper:-Logistic & SCM
BMS 5th SEM Question Paper:-Logistic & SCMYogesh Dalvi
 
6 arrays injava
6 arrays injava6 arrays injava
6 arrays injavairdginfo
 
Java question bank
 Java question bank Java question bank
Java question bankhitzsmakz
 
Ch2 introduction to c
Ch2 introduction to cCh2 introduction to c
Ch2 introduction to cHattori Sidek
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software developmentHattori Sidek
 
BMS 5th SEM Question Paper:- Ethics & Governance
BMS 5th SEM Question Paper:- Ethics & GovernanceBMS 5th SEM Question Paper:- Ethics & Governance
BMS 5th SEM Question Paper:- Ethics & GovernanceYogesh Dalvi
 

Viewers also liked (20)

One Dimentional Array
One Dimentional ArrayOne Dimentional Array
One Dimentional Array
 
Selection Control Structures
Selection Control StructuresSelection Control Structures
Selection Control Structures
 
9 lan
9 lan9 lan
9 lan
 
Ch3 selection
Ch3 selectionCh3 selection
Ch3 selection
 
Ch8 file processing
Ch8 file processingCh8 file processing
Ch8 file processing
 
Ch3 repetition
Ch3 repetitionCh3 repetition
Ch3 repetition
 
Ch6 pointers (latest)
Ch6 pointers (latest)Ch6 pointers (latest)
Ch6 pointers (latest)
 
Question bank
Question bankQuestion bank
Question bank
 
Ch4 functions
Ch4 functionsCh4 functions
Ch4 functions
 
10 high speedla-ns
10 high speedla-ns10 high speedla-ns
10 high speedla-ns
 
BMS 5th SEM Question Paper:-Logistic & SCM
BMS 5th SEM Question Paper:-Logistic & SCMBMS 5th SEM Question Paper:-Logistic & SCM
BMS 5th SEM Question Paper:-Logistic & SCM
 
6 arrays injava
6 arrays injava6 arrays injava
6 arrays injava
 
Java question bank
 Java question bank Java question bank
Java question bank
 
Ch7 structures
Ch7 structuresCh7 structures
Ch7 structures
 
Ch2 introduction to c
Ch2 introduction to cCh2 introduction to c
Ch2 introduction to c
 
13 atm
13 atm13 atm
13 atm
 
6 data linkcontrol
6  data linkcontrol6  data linkcontrol
6 data linkcontrol
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
8 spread spectrum
8 spread spectrum8 spread spectrum
8 spread spectrum
 
BMS 5th SEM Question Paper:- Ethics & Governance
BMS 5th SEM Question Paper:- Ethics & GovernanceBMS 5th SEM Question Paper:- Ethics & Governance
BMS 5th SEM Question Paper:- Ethics & Governance
 

Similar to Ch5 array nota (20)

Fp201 unit4
Fp201 unit4Fp201 unit4
Fp201 unit4
 
Unit4 Slides
Unit4 SlidesUnit4 Slides
Unit4 Slides
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
Unit 3
Unit 3 Unit 3
Unit 3
 
Unit 3
Unit 3 Unit 3
Unit 3
 
Chapter 4 (Part I) - Array and Strings.pdf
Chapter 4 (Part I) - Array and Strings.pdfChapter 4 (Part I) - Array and Strings.pdf
Chapter 4 (Part I) - Array and Strings.pdf
 
Lec2&3 data structure
Lec2&3 data structureLec2&3 data structure
Lec2&3 data structure
 
Lec2
Lec2Lec2
Lec2
 
Lec2&3_DataStructure
Lec2&3_DataStructureLec2&3_DataStructure
Lec2&3_DataStructure
 
Java part 2
Java part  2Java part  2
Java part 2
 
Intake 38 3
Intake 38 3Intake 38 3
Intake 38 3
 
Lecture_01.2.pptx
Lecture_01.2.pptxLecture_01.2.pptx
Lecture_01.2.pptx
 
Array
ArrayArray
Array
 
Arrays
ArraysArrays
Arrays
 
2D Array
2D Array 2D Array
2D Array
 
Arrays
ArraysArrays
Arrays
 
Arrays and function basic c programming notes
Arrays and function basic c programming notesArrays and function basic c programming notes
Arrays and function basic c programming notes
 
Arrays & Strings
Arrays & StringsArrays & Strings
Arrays & Strings
 
07+08slide.pptx
07+08slide.pptx07+08slide.pptx
07+08slide.pptx
 
Intro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyIntro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technology
 

More from Hattori Sidek

Chapter 4 frequency modulation
Chapter 4 frequency modulationChapter 4 frequency modulation
Chapter 4 frequency modulationHattori Sidek
 
Chapter 3 am receivers
Chapter 3 am receiversChapter 3 am receivers
Chapter 3 am receiversHattori Sidek
 
4 signal encodingtechniques
4 signal encodingtechniques4 signal encodingtechniques
4 signal encodingtechniquesHattori Sidek
 
3. transmission media
3. transmission media3. transmission media
3. transmission mediaHattori Sidek
 
2[1].1 data transmission
2[1].1 data transmission2[1].1 data transmission
2[1].1 data transmissionHattori Sidek
 
14 congestionin datanetworks
14 congestionin datanetworks14 congestionin datanetworks
14 congestionin datanetworksHattori Sidek
 
Chapter 2 amplitude_modulation
Chapter 2 amplitude_modulationChapter 2 amplitude_modulation
Chapter 2 amplitude_modulationHattori Sidek
 
Chapter 6 dc motor speed control
Chapter 6 dc motor speed controlChapter 6 dc motor speed control
Chapter 6 dc motor speed controlHattori Sidek
 

More from Hattori Sidek (17)

Chapter 4 frequency modulation
Chapter 4 frequency modulationChapter 4 frequency modulation
Chapter 4 frequency modulation
 
Chapter 3 am receivers
Chapter 3 am receiversChapter 3 am receivers
Chapter 3 am receivers
 
12 wireless la-ns
12 wireless la-ns12 wireless la-ns
12 wireless la-ns
 
11 circuit-packet
11 circuit-packet11 circuit-packet
11 circuit-packet
 
7 multiplexing
7 multiplexing7 multiplexing
7 multiplexing
 
5 digital datacomm
5 digital datacomm5 digital datacomm
5 digital datacomm
 
4 signal encodingtechniques
4 signal encodingtechniques4 signal encodingtechniques
4 signal encodingtechniques
 
3. transmission media
3. transmission media3. transmission media
3. transmission media
 
2[1].1 data transmission
2[1].1 data transmission2[1].1 data transmission
2[1].1 data transmission
 
14 congestionin datanetworks
14 congestionin datanetworks14 congestionin datanetworks
14 congestionin datanetworks
 
01 pengenalan
01 pengenalan01 pengenalan
01 pengenalan
 
01 berkenalan
01 berkenalan01 berkenalan
01 berkenalan
 
Chapter 2 amplitude_modulation
Chapter 2 amplitude_modulationChapter 2 amplitude_modulation
Chapter 2 amplitude_modulation
 
Comm introduction
Comm introductionComm introduction
Comm introduction
 
Chapter5 dek3133
Chapter5 dek3133Chapter5 dek3133
Chapter5 dek3133
 
Chapter 6 edit
Chapter 6 editChapter 6 edit
Chapter 6 edit
 
Chapter 6 dc motor speed control
Chapter 6 dc motor speed controlChapter 6 dc motor speed control
Chapter 6 dc motor speed control
 

Recently uploaded

psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 

Recently uploaded (20)

psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Ch5 array nota

  • 1. Chapter 5 : ARRAY 5.1 Introduction 5.2 One Dimensional Array 5.2.1 Declaring Array 5.2.2 Array Initialization 5.2.3 Array Referencing 5.2.4 Array to Function 5.3 Two Dimensional Array 5.3.1 Two Dimensional Array Declaration 5.3.2 Two Dimensional Array Initialization 5.3.3 Two Dimensional Array Referencing
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. 5.3.3 Two Dimensional Array Referencing (cont…) Example Program 5.8 #include<stdio.h> void main( ) { int exam_score[3][4]={{70,80,90,72},{82,92,71,81},{91,67,78,98}}; for(int row=0; row<3; row++) { for(int column=0; column<4; column++){ exam_score[row][column]= exam_score[row][column]+1; printf(&quot;[%d][%d] = %d&quot;,row,column,exam_score[row][column]); } } } //Program Output [0][0] = 71 [0][1] = 81 [0][2] = 91 [0][3] = 73 [1][0] = 83 [1][1] = 93 [1][2] = 72 [1][3] = 82 [2][0] = 92 [2][1] = 68 [2][2] = 79 [2][3] = 99