I have a question regarding a program I'm writing in C. I have a few variables which I would like to assign a random number to. However the sum of all the numbers I assign should equal 1. I have not been able to find a way to do this. Any suggestions would be appreciated!

So I am having trouble knowing what to return in the bottom method any help would be appreciated .
Here are the specifications for completing the StringArray class: