please check https://ide.codingblocks.com/s/189261
Code is still not giving output
Hey @uthyasani
You’ve initially made array a of size 1000, and then passed it into the function and you’ve calculates the no of elements m as:
m = sizeof(a)/sizeof(a[0])
m comes out to be wrong here.
It’s better than you pass n along with the a in your function call. and use r = n-1.