a simple question that bugs me.
Say I have an array defined in main like so int arr[5]. Now, if I\'m still inside main and I set int i = sizeof(arr)/sizeo
This is because arr is now a pointer and it could point to a single int or an array of 1000 ints the function just does not know. You will have to pass the size of the array into the function.
In main arr is declared as an int[5] and so the size can be calculated by the compiler.