In each case click the single most appropriate response. Only the correct response will register in the radio button.

An array is a collection of data objects of ...

of one type
of two types
of three types
of fours types
of any number of types

An array can contain values of type ...

char
int
float
double
any one of the above

int bins[] = {3, 7, 6, 6, 9, 0};

bins[1] has the value 3
bins[2] has the value 7
bins[3] has the value 6
bins[4] has the value 6
all of the above

for (n=0; n<5; n++) bins[n] = n*n;

bins[3] is assigned the value 0
bins[3] is assigned the value 1
bins[3] is assigned the value 4
bins[3] is assigned the value 9
bins[3] is assigned the value 16

float readings[5];

has elements 1 thru' to 4
has element 1 thru' to 5
has element 0 thru' to 4
has element 0 thru' to 5
has element 0 thru to 6

int d[5] = {8, 4, 5, 9};

d[2] has the value 8
d[2] has the value 4
d[2] has the value 5
can't tell what the value of d[2] is
d[2] is a non-existent element

int d[5] = {8, 4, 5, 9};

d[4] has the value 8
d[4] has the value 4
d[4] has the value 5
can't tell what the value of d[4] is
d[4] is a non-existent element

int d[5] = {8, 4, 5, 9};

d[5] has the value 8
d[5] has the value 4
d[5] has the value 5
can't tell what the value of d[5] is
d[5] is a non-existent element

int d[][2] = {8, 4, 5, 9, 3, 1};

d[0][1] has the value 8
d[0][1] has the value 4
d[0][1] has the value 5
d[0][1] has the value 9
declaration is invalid

int d[2][] = {8, 4, 5, 9, 3, 1};

d[0][1] has the value 8
d[0][1] has the value 4
d[0][1] has the value 5
d[0][1] has the value 9
declaration is invalid

Wrong answers so far:

top