"0x00401128"指令引用的“0x33463288”内存。该内存不能为"read"
#include<stdio.h>#include<conio.h>
int min,max;
void scan(int* arr,int n)
{
int i;
for(i = 0;i < n;i++)
scanf("%d",arr+i);
}
void change(int* arr,int n)
{
int i,temp,k;
temp = 0;
min = *(arr+0);
for(i = 0;i < n;i++)
{
if(min > *(arr+i))
{
min = *(arr+i);
k = i;
}
if(k != 0)
{
temp = *(arr+0);
*(arr+0) = *(arr+k);
*(arr+k) = temp;
}
}
max = *(arr+1);
for(i = 1;i < n;i++)
{
if(max < *(arr+i))
{
max = *(arr+i);
k = i;
}
if(k != 1)
{
temp = *(arr+9);
*(arr+9) = *(arr+k);
*(arr+k) = temp;
}
}
}
void print(int* arr,int n)
{
int i;
for(i = 0;i < n;i++)
printf(" %d ",*(arr+i));
}
int main(void)
{
int arr[10];
printf("请输入10个数字:");
scan(arr,10);
change(arr,10);
print(arr,10);
printf("\n");
printf("min = %d,max = %d\n",min,max);
getch();
return 0;
}
"0x00401128"指令引用的“0x33463288”内存。该内存不能为"read" 这是什么意思?