程序段 int a,b; a=5; b=a++; cout<<b;> A、4
B、5
C、6
D、7
B、5
C、6
D、7
现有如下程序段,则程序段的输出结果为 【16】 。
#include "stdio.h"
int fun()
{static int k;
return k;}
main()
{int m;
m=fun();
printf("%d\n",m);}
现有如下程序段
#include "stdio.h"
int *fun(int *a,int *b)
{int c;
c=*a%*b;
return &c;}
main()
{int a=5,b=19,*c;
c=fun(&a,&b);
printf("%d\n",++*c);}
则程序段执行后的结果为
A.8
B.7
C.6
D.5
下面程序段的输出结果是______。
#include<stdio.h>
int b=1:
int func(int *a)
{*a+=b;return(*a);)
main()
{int a=2,res=1;
res+=func(&a);
prf("%d%d\n",a,res);}
现有如下程序段: include“stdio.h” int aa(int x,int y); void main() { int a=24,b=16,c; c=aa(a,b); printf(“%d\n”,c); } int aa(int x,int y) { int w; while(Y) { w=x%y; x=y; y=w; } return x; } 则程序段的输出结果是()。
A.8
B.7
C.6
D.5
有以下程序段,在空白处填入(),可以使程序正确运行。 #include <stdio.h> int (int x,int y) {if(x>y)return &x; else return &y; } main() {int a=3,b=5,*p; p=f(a,b); printf("%d",*p); }
A、f
B、*f
C、(*f)
D、其余选项都不对
现有如下程序段
#include "stdio.h"
int fun(int k,int *m)
{if(k%3)*m=k*k;
else *m=k/3;}
main()
{ int (*p)(int,int *),m;
p=fun;
(*p)(78, &m);
printf("%d\n",m);}
则程序段的输出结果为
A.24
B.25
C.26
D.27
执行下列语句段后程序的输出结果是______。
int x[]={1,2,3,4,5};
int q=x;
cout<<*(q)<<end1;
执行以下程序段后,变量x=______,y______。
int x=5;
int y=0;
y = --x * 3;
若有以下程序段 doublex=5.16894; printf(%f\n,(int)(x*1000+0.5)/(double)1000); 则程序段的输出结果是
A.5.175000
B.5.169000
C.5.170000
D.5.168
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!