Arrays

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

Arrays

store multiple variables of the same type

2
New cards

int anArray[7]

int: data type

anArray: name/ identifier

[7]: size

3
New cards

elements 

value stored in a specific space in the array

4
New cards

for loops

help store values into each space in the array

uses int value index or whatever you want to call it

5
New cards

anArray[3] = 1;

anArray[3]: expression used to refer to one element

=1: the value of that element

6
New cards

if you reach outside the bounds of the array

there won’t be a compiler error

might lead to junk

7
New cards

Macro

can be used to set size

can be set then changed using varible in the array

#define SIZE 100

int array[SIZE]

use for loop with index to store into array[index]

8
New cards

variable

user decides size

9
New cards

scalar

single value varibles

10
New cards

composite

multiple values

11
New cards

Behavior

data isn’t displayed but stays within the size you have set for the data

12
New cards

contiguous

memory addresses are sequential