Actually that particular line of code would be much more beneficial in main() where it would avoid the need for manually counting the size of the array and typing the value into three separate function calls.
Thank you guys. Fresh eyes helped. I see my mistake now. It kept throwing me into infinite loop and I played around with code and I think messed it out completely.
It works. thank you for your help again