請教C高手

來源: 喜歡編程 2004-06-21 20:07:06 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (521 bytes)
我在學習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<10;x++)
printf("\nElement %d:\t%ld\t\t%ld\t\t%ld",x,&i[x],&f[x],&d[x]);
printf("\n=================================================");
return 0;
}

所有跟帖: 

tc 2.0 太老了,好好看看printf格式命令 -tty- 給 tty 發送悄悄話 (26 bytes) () 06/22/2004 postreply 01:59:32

gcc on linux編譯的執行文件能在dos下用嗎? -gcc- 給 gcc 發送悄悄話 (0 bytes) () 06/22/2004 postreply 13:06:36

請您先登陸,再發跟帖!