网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有下列程序: #include<stdi0.h> structord {intx,y;}dt[2]={1,2,3,4}; voidmain( ) {structord*p=dt; printf("%d,",++P->x);printf("%d,",++P ->y); } 程序的运行结果是( ).
A.1,2
B.2,3
C.3,4
D.4,1
参考答案
更多 “ 有下列程序: #includestdi0.h structord {intx,y;}dt[2]={1,2,3,4}; voidmain( ) {structord*p=dt; printf("%d,",++P-x);printf("%d,",++P -y); } 程序的运行结果是( ).A.1,2B.2,3C.3,4D.4,1 ” 相关考题
考题
有以下程序#include stdio.hstruct ord{ int x,y; } dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf("%d,",++p-x); printf("%d\n",++p-y);}程序的运行结果是A)1,2B)2,3C)3,4D)4,1
考题
(37)有以下程序#include stdio.hstruct ord{ int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf (“%d,”,++p-x); printf(“%d\n”,++p-y);}程序的运行结果是A)1,2 B)2,3 C)3,4 D)4,1
考题
下列程序的运行结果是【】。 include class Sample {int x,y;public:Sample() {x=y=0
下列程序的运行结果是【 】。include <iostream. h>class Sample {int x,y;public:Sample() {x=y=0; }Sample(int a, int b) {x=a;y=b;}void disp() {cout<<" x=" <<x<<" , y="<<y<<end1;}};void main() {Sample s1, s2(1, 2);s1. disp0;s2. disp ();}
考题
以下程序的输出结果是( )。 {int x;int*y;}*p; int dt[4]={1,2,3,4}; struct st aa[4]={2,dt[0],3,dt[0],4,dt[0],5,dt[0],}; {p=aa; pfintf("%d\n",++(p->x)); }A.1B.2C.3D.4
考题
有以下程序includestruct ord{ int x,y;} dt[2]={1,2,3,4};mare(){struct ord*p=dt; p
有以下程序 #include<stdio.h> struct ord { int x,y;} dt[2]={1,2,3,4}; mare() { struct ord*p=dt; printf("%d,",++p->x); printf("%d\n",++p->y); } 程序的运行结果是______。A.1,2B.2,3C.3,4D.4,1
考题
请教:2011年3月计算机等级考试二级C语言真题(标准参考答案版第1大题第37小题如何解答?
【题目描述】
(37)有以下程序
#include stdio.h
struct ord
{ int x,y;}dt[2]={1,2,3,4};
main()
{
struct ord *p=dt;
printf(%d,,++(p-x)); printf(%d\n,++(p-y));
}
程序运行后的输出结果是
A)1,2
B)4,1
C)3,4
D)2,3
考题
有以下程序#includestdio.hstruct ord{int x,y;} dt[2]={1,2,3,4};main(){struct ord*p=dt;printf(“%d,”,++(p一x));printf(“%d\n”,++(p一y));}程序运行后的输出结果是A.1,2B.4,1C.3,4D.2.3
考题
有以下程序: #includestdio.h struct ord {int X,y;)dt[2]={1,2,3,4}; main( ) { struct ord*p=dt; printf("%d,",++(p-x));printf("%d\n",++(p-y)); } 程序运行后的输出结果是( )。A.1,2B.4,1C.3,4D.2,3
考题
(37)有以下程序#include stdio.hstruct ord{ int x,y;}dt[2]={1,2,3,4};main(){struct ord *p=dt;printf("%d,",++(p-x)); printf("%d\n",++(p-y));}程序运行后的输出结果是A)1,2B)4,1C)3,4D)2,3
热门标签
最新试卷