runtime error

why m i getting runtime error in the code http://ideone.com/Hi5ENf ?

the array is very small!!!
The first thing I would suggest is that you actually prompt the user when you are trying to get input. Tell them what you are expecting them to enter.

I ran the program and supplied the input shown and the program ran "properly", meaning no runtime error.

I don't fully understand the detailed logic.
Nevertheless, the thing obviously missing is return 0; at the end of main(). It may be that ideone is sensitive to the value returned when the program terminates.
In function ‘main’:
150:1: warning: control reaches end of non-void function [-Wreturn-type] (C90)
In function ‘deletearr’:
134:1: warning: control reaches end of non-void function [-Wreturn-type]
118:19: warning: ‘min’ may be used uninitialized in this function [-Wmaybe-uninitialized]


I don't fully understand the detailed logic.
¿detailed logic? ¿where?
¿detailed logic? ¿where?
I traced the code through using a debugger, and paid no attention to the significance or validity of any of the code, other than seeing that it didn't use uninitialised values or clearly out-of bounds array values.
Topic archived. No new replies allowed.