C语言两次output(a) ; 为什么输出结果不同?明显经过Creat() 函数后值就变了。结构体数组a和b的区别 ?

2025-04-16 01:32:34
推荐回答(1个)
回答1:

void output (struct record A[N])
{
int j ;
printf("\n\n\n A= ");
for (j=0 ;j {
printf("%4.2fa^%d ",A[j].c , A[j].e);
if (j printf ("+") ;
}
printf("\n\n\n");
return ;
}

void Creat(struct record x[N])
{
int i ;
printf("input contant to X : \n\n");
for (i=0 ; i {
printf(" input c : ");
x[i].c=input1( );
printf(" input e : ");
x[i].e=input2( );
}
return ;
}