+ 1

Why is it not working ?

A program to reverse an arbitrary sized array in C https://code.sololearn.com/cEgCzvAKE409/?ref=app

31st Jul 2018, 12:28 PM
Ishan
Ishan - avatar
3 Respostas
+ 3
You forgot the &n in scanf, since scanf takes a pointer.
31st Jul 2018, 12:42 PM
Dennis
Dennis - avatar
+ 2
issue is with scanf...change both as below and it is done: scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&(p[i]));
31st Jul 2018, 12:58 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
Thanks to you both , I just forgot & with n.. Thanks .
31st Jul 2018, 2:01 PM
Ishan
Ishan - avatar