请教C高手

来源: 2004-06-21 20:07:06 [旧帖] [给我悄悄话] 本文已被阅读:

我在学习c,用turbo c 2。可是以下程序怎么老是出现意外结果?其中double array的地址居然保持不变?请教了。

#include

int i[10],x;
float f[10];
double d[10];

main()
{
printf("\t\tInteger\t\tFloat\t\tDouble");
printf("\n=================================================");

for (x=0;x printf("\nElement %d:\t%ld\t\t%ld\t\t%ld",x,&i[x],&f[x],&d[x]);
printf("\n=================================================");
return 0;
}