IUP Computer Science                                                    Name ________________
COSC 110
 
 

Exercise #7a

Show what values will be in each of the elements of the quiz array when the
statements finish executing;

int  hold;
int  pick;
int  quiz[5];

quiz[0] = 1;
for (pick = 1; pick < 5; pick++)
{
     hold = pick - 1;
     quiz[pick] = quiz[hold] + pick;
}



quiz[0] =

quiz[1] =

quiz[2] =

quiz[3] =

quiz[4] =
 
 

IUP Computer Science                                                    Name ________________
COSC 110
 
 

Exercise #7a

Show what values will be in each of the elements of the quiz array when the
statements finish executing;

int  hold;
int  pick;
int  quiz[5];

quiz[0] = 1;
for (pick = 1; pick < 5; pick++)
{
     hold = pick - 1;
     quiz[pick] = quiz[hold] * pick;
}



quiz[0] =

quiz[1] =

quiz[2] =

quiz[3] =

quiz[4] =