#include
void main()
{
int table[8]={1,2,3,4,5},i;
printf("输出原数组:\n");
for(i=0;i<8;i++)
printf("%d ",table[i]);
printf("请对数组重新赋值:\n");
for(i=0;i<8;i++)
{printf("请输入第%d个元素:\n",i+1);
scanf("%d",&table[i]);
}
printf("输出重新赋值数组:\n");
for(i=0;i<8;i++)
printf("%d ",table[i]);
}
楼主你定义本身就是有一点问题,如果是unsigned char table[8]={'1','2','3','4','5','6','7','8'}
要不就是
char table[8]="1234567";