Chapter 6 - Arrays Outline Multiple-Subscripted Arrays.

Slides:



Advertisements
Similar presentations
Section 13-4: Matrix Multiplication
Advertisements

1 Arrays in JavaScript Name of array (Note that all elements of this array have the same name, c ) Position number of the element within array c c[6] c[0]
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 6 - Arrays Outline 6.1Introduction 6.2Arrays.
11-1 Chapter 11 2D Arrays Asserting Java Rick Mercer.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 6 - Arrays Outline 6.1Introduction 6.2Arrays 6.3Declaring Arrays 6.4Examples Using Arrays 6.5Passing.
Chapter 6 C Arrays Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc. Arrays are data structures.
 2007 Pearson Education, Inc. All rights reserved. 1 C Arrays.
Arrays (Part II). Two- and Multidimensional Arrays Two-dimensional array: collection of a fixed number of components (of the same type) arranged in two.
Multiplying matrices An animated example. (3 x 3)x (3 x 2)= (3 x 2) These must be the same, otherwise multiplication cannot be done Is multiplication.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
Systems Programming Concepts
11-1 Chapter 11 2D Arrays Asserting Java Rick Mercer.
Programming Languages -1 (Introduction to C) arrays Instructor: M.Fatih AMASYALI
 2007 Pearson Education, Inc. All rights reserved C Arrays.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 6 - Arrays Outline 6.1Introduction 6.2Arrays.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
Copyright © 2011 Pearson, Inc. 7.2 Matrix Algebra.
Chapter 6 Arrays Associate Prof. Yuh-Shyan Chen Dept. of Computer Science and Information Engineering National Chung-Cheng University.
Algorithm and Programming Array Dr. Ir. Riri Fitri Sari MM MSc International Class Electrical Engineering Dept University of Indonesia 15 March 2009.
 2000 Prentice Hall, Inc. All rights reserved Arrays Array –Group of consecutive memory locations –Same name and type To refer to an element, specify.
Arrays Array –Group of consecutive memory locations –Same name and type To refer to an element, specify –Array name –Position number Format: arrayname.
C Lecture Notes 1 Arrays Lecture 6. C Lecture Notes 2 6.1Introduction Arrays –Structures of related data items –Static entity – same size throughout program.
C Arrays Systems Programming. Systems Programming: Arrays 22 ArraysArrays  Arrays  Defining and Initializing Arrays  Array Example  Subscript Out-of-Range.
Lecture 16: Working with Complex Data Arrays. Double-Subscripted Arrays Commonly used to represent tables of values consisting of information arranged.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
8.2 Operations With Matrices
C Lecture Notes 1 Arrays (...cont.). C Lecture Notes 2 6.6Sorting Arrays Sorting data –Important computing application –Virtually every organization must.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Arrays Outline 6.1Introduction 6.2Arrays 6.3Declaring.
Notes Over 4.2 Finding the Product of Two Matrices Find the product. If it is not defined, state the reason. To multiply matrices, the number of columns.
Chapter 4 Section 1 Organizing Data into Matrices.
Lesson 43: Working with Matrices: Multiplication
12-1 Organizing Data Using Matrices
Two-Dimensional Arrays
1.5 Matricies.
Computer Programming BCT 1113
Microsoft Visual Basic 2005: Reloaded Second Edition
multi-dimensional arrays
© 2016 Pearson Education, Ltd. All rights reserved.
Multiplication table. x
Arrays Declarations CSCI N305
Matrix Operations SpringSemester 2017.
C Arrays.
C Arrays Systems Programming.
Multiplying Matrices.
WarmUp 2-3 on your calculator or on paper..
Multidimensional Arrays
Multiple Dimension Arrays
Chapter 6 - Arrays Outline 6.1 Introduction 6.2 Arrays
Chapter 9 - Arrays Outline 6.1 Introduction 6.2 Arrays
Introduction to Matrices
Arrays Outline Introduction Arrays Declaring Arrays
C++ Programming Lecture 16 Arrays – Part III
Chapter 6 - Arrays Outline 6.1 Introduction 6.2 Arrays
MSIS 655 Advanced Business Applications Programming
Calendar like the Periodic Table
6 C Arrays.
Multidimensional array
Multiplying Matrices.
Matrix Operations SpringSemester 2017.
Section 8.1 – Systems of Linear Equations
C++ Array 1.
Dale Roberts, Lecturer IUPUI
Multiplying Matrices.
Programming Arrays.
Multiplying Matrices.
Matrix Multiplication Sec. 4.2
Introduction to Matrices
Multiplying Matrices.
Chapter 7 Section 7.2 Matrices.
L4-5/L4-6 Objective: Students will be able to evaluate determinants of matrices.
Presentation transcript:

Chapter 6 - Arrays Outline Multiple-Subscripted Arrays

In this chapter, you will learn: Objectives In this chapter, you will learn: To be able to define and manipulate multiple subscript arrays.

6.9 Multiple-Subscripted Arrays Tables with rows and columns (m by n array) Like matrices: specify row, then column Row 0 Row 1 Row 2 Column 0 Column 1 Column 2 Column 3 a[ 0 ][ 0 ] a[ 1 ][ 0 ] a[ 2 ][ 0 ] a[ 0 ][ 1 ] a[ 1 ][ 1 ] a[ 2 ][ 1 ] a[ 0 ][ 2 ] a[ 1 ][ 2 ] a[ 2 ][ 2 ] a[ 0 ][ 3 ] a[ 1 ][ 3 ] a[ 2 ][ 3 ] Row subscript Array name Column subscript

6.9 Multiple-Subscripted Arrays Initialization int b[ 2 ][ 2 ] = { { 1, 2 }, { 3, 4 } }; Initializers grouped by row in braces If not enough, unspecified elements set to zero int b[ 2 ][ 2 ] = { { 1 }, { 3, 4 } }; Referencing elements Specify row, then column printf( "%d", b[ 0 ][ 1 ] ); 1 2 3 4 1 0 3 4  

fig06_21.c (Part 1 of 2)

fig06_21.c (Part 2 of 2) Program Output Values in array1 by row are: 1 2 3 4 5 6 Values in array2 by row are: 4 5 0 Values in array3 by row are: 1 2 0 4 0 0