首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

以下程序的输出结果是#include<stdio.h>struct st{ int x;int *y;}*p;int dt[4]={10,20,30,40};s

以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],}; main() { p=aa; printf("%d\n",++(p->x));}

A.10

B.11

C.51

D.60

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“以下程序的输出结果是#include<stdio.h>str…”相关的问题
第1题
设已执行预编译命令#include<string.h>,以下程序段的输出结果是()。char s[]="an apple";printf("

设已执行预编译命令#include<string.h>,以下程序段的输出结果是()。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));

A.7

B.8

C.9

D.10

点击查看答案
第2题
以下程序的输出结果是()。 #include<iostream.h>longfun(intn){longs; if(n=-1‖n==2)s=2;

以下程序的输出结果是()。

#include<iostream.h>

longfun(intn)

{longs;

if(n=-1‖n==2)s=2;

elses=n-fun(n-l):

returns;

}

voidmain(){cout<<fun(3);}

A.1

B.2

C.3

D.4

点击查看答案
第3题
有以下程序 #include<stdio.h> #define PT3.5; #define S(x)PT*x*x; main() { inta=1,b2; printf("%4.1f\n",S(a+b); } 程序运行后的输出结果是______。

A.14.0

B.31.5

C.7.5

D.程序有错无输出结果

点击查看答案
第4题
以下程序运行后,输出结果是______。 #define P4.5 #define S(x)P*x*x #include<stdio.h> main() {

以下程序运行后,输出结果是______。 #define P4.5 #define S(x)P*x*x #include<stdio.h> main() { int a=2,b=3; printf("%.1f\n",S(a+b)); }

A.49.5

B.112.5

C.18

D.24

点击查看答案
第5题
以下程序的输出结果是 () #include<stdlib.h> int a [3] [3]={1,2,3,4,5,6,7,8,9},*p; main()

以下程序的输出结果是 () #include<stdlib.h> int a [3] [3]={1,2,3,4,5,6,7,8,9},*p; main() { p=(int *)malloc(sizeof(int)); f(p,a); printf("%d\n",*p); } f(int *s,intp[][3]) { *s=p[1][1]; }

A.1

B.4

C.7

D.5

点击查看答案
第6题
以下程序运行后,输出结果是()。 #include<stdio.h> #define PT 5.5 #define S(x)PT*x*X ma

以下程序运行后,输出结果是()。 #include<stdio.h> #define PT 5.5 #define S(x)PT*x*X main { int a=1,b=2: printf("%4.1f\n",s(a+b)); }

A.49.5

B.9.5

C.22.0

D.45.0

点击查看答案
第7题
以下程序的输出结果是 【 11 】 。#include <stdio.h>int fun(int x){ static int t=0;r

以下程序的输出结果是 【 11 】 。

#include <stdio.h>

int fun(int x)

{ static int t=0;

return(t+=x);

}

main()

{ int s,i;

for(i=1;i<=5;i++) s=fun(i);

printf("%d\n",s);

}

点击查看答案
第8题
有以下程序:include<stdio.h>include<strin9.h>main(){printf{"%d\n",s

有以下程序:

include<stdio.h>

include<strin9.h>

main()

{printf{"%d\n",strlen("%d\n",strlen("ATS\n012\|"));}

程序运行后的输出结果是()。

A.3

B.8

C.4

D.9

点击查看答案
第9题
以下程序的输出结果是()。 #include<iostream.h> long fun(int n) {long s; if(n==1||n==2)s=2; else s=n-fun(n-1); return s; } voidmain(){cout<<fun(3);}

A.1

B.2

C.3

D.4

点击查看答案
第10题
有以下程序: #include<stdio.h> main { char s[]="rstuv"; printf("%c\n",*s+2); }

有以下程序: #include<stdio.h> main { char s[]="rstuv"; printf("%c\n",*s+2); } 程序运行后的输出结果是()。

A.tuv

B.字符t的ASCIl码值

C.t

D.出错

点击查看答案
第11题
以下程序的输出结果是()。#include<iostream>using namespace std;void fun(char**q){++q;cout<<*

以下程序的输出结果是()。 #include<iostream> using namespace std; void fun(char**q) { ++q; cout<<*q<<end1; } main() { static char*s[]={"HI","HELL0","TEST"}; char**p; p=s; fun(p); system("PAUSE"); return 0; }

A.为空

B.HI

C.HELL0

D.TEST

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改