keep track of friends and number of days not spoken to, dynamic memory location
First of all the "growArray" function will never be called since you put it inside an if block that runs only once. when the if statement is evaluated your size is 10 and your next_element+1 is 1 and you never check for (size == next_element+1) again.