Us C++ 2021 03
Us C++ 2021 03
For example:
int c [12] ;
int b [100], x[27];
C++ Arrays start at 0 !!!!!!!
The first element is the 0th element!
foo[i]
char A[4][3];
{
A[0]
A[0][0]
A[0][1]
A[0][2]
{
A is an array of size 4.
A[1][0]
Each element of A is A[1] A[1][1]
an array of 3 chars A[1][2]
{
A[2]
A[2][0]
A[2][1]
A[2][2]
{
A[3]
A[3][0]
A[3][1]
A[3][2]
Initialize a Multiple-Subscripted Array
double grades[NumStudents][NumHW];
}
Exercise 1
Use a single-subscripted array to solve the following
problem.