Hi guys the code I wrote does not do what I thought it would do,I was expecting printRay to print nothing or garbage because I thought since I was passing the array ra in by value(copy) to fillRay that it would just make a copy and not fill the array ra but yet it feels the array I thought that if I wanted to fill the array and be able to use it I would have had to pass by reference?
Fixed sized arrays decay to a pointer when passed as a parameter into a function. So when passing an array you are not making a local copy, your function can modify the array.