#include <stdio.h>
#define N 100
int main()
{
int n,c,d,a[N],b[N];
printf("Insert elements numbers in the array\n");
scanf("%d ", n);
printf("Insert the elements in the array\n");
for (c = 0; c < n ; c++)
scanf("%d", a[c]);
for (c=n-1,d = 0;d < n; c--,d++)
b[d]= a[c];
for(c = 0; c <n; c++)
a[c] = b[n];
printf("The array inverted is\n");
for(c=0; c<n;c++)
printf("%d\n",a[c]);
return 0;
}
그 이유는 무엇입니까? 내가 값 (N < 100)과 함께 시도했지만 여전히 충돌, 나는 그것을 고칠 방법을 모르겠습니까? 누군가 나를 도와 줄 수 있니? 감사 !왜 충돌이 있습니까? (버퍼 오버플로)
'는 scanf ("%의 D", N)', '&n);' –
를 '는 scanf ("%의 D"이어야 [C] = b [n];'? – BLUEPIXY