C++程序阅读试题.pdfVIP

  • 1
  • 0
  • 约7.42千字
  • 约 12页
  • 2026-04-04 发布于河北
  • 举报

C++程序阅读题

1.阅读以下程序:

#include

usingnamespacestd;

voidf(intx,inty){intz=x;x=y;y=z;}

intmain()

(

intx=0,y=l;

f(x,y);

coutxyendl;p=

return0;

)

运行时的输出结果是

2.阅读以下程序:

#include

usingnamespacestd;

constintM=3,N=4;

intmain()

(

intij,s=O;

for(i=l;i=M;i++)

for(j=l;j=N;j++)

s+=i*j;

nH

couts=sendl;p=

return0;

)

执行这段程序的结果是。

3.阅读以下程序:

#include

using

文档评论(0)

1亿VIP精品文档

相关文档