问题详情

下面程序应能对两个整型变量的值进行交换。以下正确的说法是

main()

{int a=10,b=20;

printf("(1)a=%d,b=%d\n",a,b);

swap(&a,&b);

printf("(2)a=%d,b=%d\n",a,b);

}

swap(int p,int q)

{int t;

t=p;p=q;q=t;

}

A.该程序完全正确

B.该程序有错,只要将语句swap(&a,&b);中的参数改为a,b即可

C.该程序有错,只要将swap()函数中的形参p和q以及t均定义为指针(执行语句不变)即可

D.以上说法都不对

未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。 收藏该题
查看答案

相关问题推荐

Which of the following actions will enable 64-bit applications on a system with a 32-bit kernel?()

A、change the kernel to 64bit, reboot, and then use the following command:chdev -l sys0 -a applications=64_bit

B、Re-install the OS with 64-bit kernel enabled

C、Re-install all applications with 64-bit versions

D、Use smit to enable the 64-bit applications

非空的循环单链表head的尾结点(由p所指向),满足

A.p->next==NULL

B.p==NULL

C.p->next=head

D.p=head

软件维护活动包括以下几类:改正性维护、适应性维护、【3】维护和预防性维护。

以下定义的结构体类型拟包含两个成员,其中成员变量info用来存入整形数据;成员变量link是指向自身结构体的指针,请将定义补充完整。

structnode

{intinfo;

【19】link;

};

Which command would an administrator use to list which filesystems are in volume group datavg?()

A、lspv datavg

B、lslv -a datavg

C、lsfs -v datavg

D、lsvg -l datavg

联系客服 会员中心
TOP