PilotCoder's blog

By PilotCoder, history, 7 weeks ago, In English

I finish this code, but the judger says I am out of bounds, can anyone tell me why or is there anyting wrong on other places? Thanks very much.

my submission

Begged for help.

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

You are passing the integer array c whose number of elements is 5 to the function check(int *a) that copies the first n items from a to temp. If n > 5, then out-of-bound error happens.