R1
-
What is an array?
Is an aggregate data type that lets us access many variables of the same type through a single identifier. -
Which index would you use to access the 2nd variable in an array?
-
What can you say about the size of an array?
Array length multiplied by element size.
R2
-
How can you initialize an array?
Initializer list. -
How can you get the size of an array in bytes?
sizeof (array); -
How can you use the function sizeof in order to calculate the number of elements in an array?
To get the number of elements in an array you must divide the arrayâs size by size of single element. -
What happens when you try to write outside the bounds of the array?
Undefined behavior â For example, this could overwrite the value of another variable, or cause your program to crash.