when i debug this code it shows me this error message, Stack around the variable 'A' is corrupte. what does that even mean?? Just to be clear i want the program to swap the upper half with the lower half. like this A[0]=A[5].
int main()
{
int A[10];
int i, s;
for (i = 0; i <= 9; i++)
{
cout << "A[" << i << "]=";
cin >> A[i];
}
for (i = 0; i <= 4; i++)
{
s = A[i];
A[i] = A[i + 5];
A[i + 5] = s;
}
for (i = 0; i <= 9; i++)
{
cout << "A[ " << i << " ]=";
cout << A[i] << endl;
}
return 0;
}