#include <stdio.h>
int main()
{
int i, j, temp;
int a[100];
scanf_s("%s", &a[10],10);
for (j = 0; j < 9; j++)
{
for (i = 0; i < 9 - j; i++)
{
if (a[i] > a[i + 1])
{
temp = a[i];
a[i] = a[i + 1];
a[i + 1] = temp;
}
}
} for (i = 0; i < 10; i++)
{
printf("%d,", a[i]);
}
return 0;
}
报错 :Run-Time Check Failure #2 - Stack around the variable 'a' was corrupted.