技术岗笔试真题:C++程序结果分析.pdfVIP

  • 0
  • 0
  • 约1.16万字
  • 约 18页
  • 2026-03-23 发布于北京
  • 举报

一、选择题

1、以下程序的打印结果是()

[cpp]查看纯文本#includeiostream使

_

用命名空间std;voidswapint(inta,intb)

{inttemp=a;a=b;b=temp;}voidswap_

str(char*a,char*b){char*temp=a;a=

b;b=temp;}intmain(void){inta=10;i

_

ntb=5;char*stra=helloworld;char*

__

strb=worldhello;swapint(a,b);

___

swapstr(stra,strb);printf(%d%d%s

__

%s\n,a,b,stra,strb);return0;}

A、105helloworldworldhelloB、105worldhellohello

worldC、510helloworldworldhe

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档