Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Topic 7
- Slide 2
- Array - A variable that can store many values.
- There is a physical limit but as far as software there is no limit
- example
- my_friends[5]; // number in hard brackets represents size of array,
- there are five elements in this example.
- To access individual cells you use their 'index'
- Ex. Cells are 0-4 in this case. First cell is 0
- my_friends[0] = 'Sam'; // Assigns the value ""Sam" to the first index in this array
- When declaring an array you must state the size
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement