Arrays and Vectors
[Pages:46]Chapter 07
Arrays and Vectors
Fall 2020 The Borough of Manhattan
Community College
Arrays Hold Multiple Values
?Array: a variable that can store multiple values of the same type ?The values are stored in consecutive memory locations ?It is declared using [] operator
const int ISIZE = 5; int tests[ISIZE];
Array Storage in Memory
The definition
int tests[ISIZE]; // ISIZE is 5
allocates the following memory
Accessing Array Elements
Array elements (accessed by array name and subscript) can be used as regular variables
tests[0] = 79; cout > tests[1]; tests[4] = tests[0] + tests[1]; cout ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- distance between 2 vectors calculator
- distance between two vectors calculator
- list of vectors in physics
- what are vectors in physics
- vectors mathematics formulas
- sum of two vectors calculator
- vectors physics formulas
- basic vectors pdf
- why do unit vectors equal 1
- examples of vectors and scalars
- vectors maths pdf
- vectors physics ppt