Intention is, there’s 10 elements inside ara and we’ve to inverse this, mean~last to first.
I already know from my programing book that,there’s a bug inside code but what is bug? and how to debug it?
Here is my code----
#include <stdio.h>
int main()
{
int ara[] = {10,20,30,40,50,60,70,80,90,100};
int i,j,temp;
for(i=0,j=9;i<10;i++,j--){
temp = ara[j];
ara[j] = ara[i];
ara[i] = temp;
}
for(i=0;i<10;i++){
printf("%d\n",ara[i]);
}
return 0;
}
Anyone Help me, please