1-D Arrays

Note 7.1.1: Array Rationale 1

Note 7.1.2: Array Rationale 2

Note 7.2.1: Array Rules 1

Note 7.2.2: Array Rules 2

Note 7.2.3: Array Rules 3

Note 7.2.4: Array Rules 4

Note 7.2.5: Array Rules 5

Note 7.3.1: Assigning to Array Elements 1

Note 7.3.2: Assigning to Array Elements 2

Note 7.3.3: Assigning to Array Elements 3

Note 7.3.4: Assigning to Array Elements 4

Note 7.3.5: Assigning to Array Element     Example 1

Note 7.4.1: Looping with Arrays 1     Example 2

Note 7.4.2: Looping with Arrays 2     Example 3

Note 7.4.3: Looping with Arrays 3     Example 4

Note 7.4.4: Looping with Arrays 3     Example 4

Note 7.5.1: Looping with Arrays - Standard Deviation 1     Example 5

        See also Supplemental Topics.

Note 7.5.2: Looping with Arrays - Standard Deviation 2     Example 6

Note 7.5.3: Looping with Arrays - Standard Deviation 3     Example 7

Note 7.6: Initializing Arrays

Note 7.7.1: Passing Array Element as Argument     Example 8

Note 7.7.2: Passing Array Element Address as Argument     Example 9

Note 7.7.3: Change Value at Passed Array Element Address     Example 10

Note 7.8.1: Array as Argument 1

Note 7.8.2: Array as Argument 2

Note 7.9.1: Pass Array Name (First Address) as Argument 1     Example 11

Note 7.9.2: Pass Array Name (First Address) as Argument 2     Example 12

Note 7.9.3: Pass Array Name (First Address) as Argument 3     Example 13

Note 7.9.4: Pass Array Name (First Address) as Argument 4     Example 14

Note 7.10.1: Search Array for a Value     Example 15

Note 7.10.2: Search Array for Largest Value     Example 16

Note 7.10.3: Swap Array Elements

Note 7.11.1: Pointers to an Array 1

Note 7.11.2: Pointers to an Array 2

Note 7.12.1: Accessing Array Elements with Pointer     Example 17

Note 7.12.2: Accessing Array Elements with Pointer Using Normal Array Notation     Example 18

Note 7.13.1: String Constant Assigned to Pointer

Note 7.13.2: String Built In Char Array

Note 7.14: Pass String Name to Function     Example 19

Note 7.14.5: gets vs scanf     Example 19.5

Note 7.15.1: Cannot Reassign String Name in Function 1     Example 20

Note 7.15.2: Cannot Reassign String Name in Function 2     Example 21

Note 7.15.3: Cannot Reassign String Name in Function 3     Example 22

Note 7.15.4: Cannot Reassign String Name in Function 4     Example 23

Note 7.16.1: Copy String Element By Element     Example 24

Note 7.16.2: Copy String Using strcpy 1     Example 25

Note 7.16.3: Copy String Using strcpy 2     Example 26

Note 7.17: String Length With strlen     Example 27

Note 7.18: String Compare With strcmp     Example 28

Note 7.19.1: Dynamic Allocation of Memory - malloc() and calloc() - malloc()

Note 7.19.2: Dynamic Allocation of Memory - malloc() and calloc() - malloc()     Example 29

Note 7.19.3: Dynamic Allocation of Memory - malloc() and calloc() - calloc()

Note 7.19.4: Dynamic Allocation of Memory - malloc() and calloc() - calloc()     Example 30

Note 7.20.1: Dynamic Allocation of Memory - Garbage Generation     Example 31

Note 7.20.2: Dynamic Allocation of Memory - Garbage, Incorrect free     Example 32