题目内容 (请给出正确答案)
[主观题]

#include "stdio.h" void stu(_________); void main() { int a=8,b=9; stu(a,b) } void stu (_____) { int aum; aum=a*b; printf("积为:",_______); }

提问人:网友wsk1314 发布时间:2022-01-07
参考答案
  抱歉!暂无答案,正在努力更新中……
如搜索结果不匹配,请 联系老师 获取答案
更多“#include "stdio.h" void stu(__…”相关的问题
第1题
以下程序的运行结果是______。 #include<stdio.h> #include<string.h> typedef struct{char name[9]; char sex; float score[2];} STU; void f(STU a) { STUb={"Zhao",'m',85.0,90.0}; int i; strcpy(a.name, b.name); a.sex=b.sex; for(i=0;i<2;i++)a.score[i]=b.score[i]; } main() { stuc="{&quot;Qian&quot;,'f',95.0,92.0};" f(c);> A、Qian,f,95,92

B、Qian,m,85,90

C、Zhao,f,95,92

D、Zhao,m,85,90

点击查看答案
第2题
请根据程序中的注释,把程序补充完整 #include <stdio.h> struct student { char name[20]; double score; }; void prn(struct student *p); int main() { struct student s; scanf("%s%lf", s.name, &s.score); prn(&s); return 0; } void prn(struct student *p) { printf("%s, %.2f\n", ____________); //输出学生的姓名和成绩, }
点击查看答案
第3题
假设有声明 typedef char string[6]; string name; 则如下合法的语句是:__________。

A、name[0]='a';

B、string="abc";

C、string[0]='a';

D、name="abc"

点击查看答案
第4题
有下列程序: #include voidmain() {stuctSTU{charname[9];charsex;double score[2];}; stuctSTUa={"Zha0",m,85.0,90.0),b={" Qian",f,95.0,92.0}; b=a: printf("%S,%C,%2.0,%2.0\n”,b.name,b.sex, score[O],bscore[1]); 程序的运行结果是()。

A.Qian,f,95,92

B.Oian,m,85,90

C.Zha0,f,95,92

D.Zha0,m,85,90

点击查看答案
第5题
#include< reg51.h>和#include" reg51.h",本质一样。
点击查看答案
第6题
下列给定程序中,函数fun()的功能是:对N名学生的学习成绩,按从高到低的顺序找出前叫m≤10)名学生来,并将这些学生数据存放在一个动态分配的连续存储区中,此存储区的首地址作为函数值返回。

请改正程序中的错误,使它能得出正确的结果。

注意:不要改动main函数,不得增行或删行,也不得更改程序的结构.

试题程序:

include <conio.h>

include <string.h>

include <stdio.h>

include <alloc.h>

define N 10

typedef struct ss

{char num[10];

int s;

} STU;

STU *fun{STU a[], int m)

{ STU b[N] ,*t;

int i, j,k;

/*************found**************/

*t=calloc (m, slzeof (STU));

for(i=0;i<N;i++) b[i]=a[i];

for(k=0; k<m; k++)

{ for (i=j=0;i<N;i++)

if (b[i].s>b[j].s) j=i;

/*************found**************/

t[k].num=b [j].num;

t[k].s=b[j] s;

b[j].s=0;

}

return t;

}

outresult(STU a[],FILE *pf)

{ int i;

for (i=0; i<N; i++)

fprintf(pf, "No=%s Mark-%d\n ",

a [i] .num, a[i].s);

fprintf(pf, "\n\n ");

}

main ( )

{ STU a[N]={{ "A01 ",81},{ "A02 ",89},

{ "A03 ",66},{ "A04 ",87},{ "A05 ",77},

{ "A06 ",90},{ "A07 ",79},{ "A08 ",61},

{ "A09 ",80},{ "Al0 ",71}};

STU *pOrder;

int i, m;

clrscr ();

printf ("*****THE RESULT***** \n");

outresult (a, stdout);

printf ("\nGive the number of the students

who have better score: ");

scanf ("%d", &m);

while (m>10)

{ printf("lnGive the number of the

students who have better score: ");

scanf ("%d", %m);

pOrder=fun (a,m);

printf("***** THE RESULT*****kn");

printf("The top :\n");

for (i=0; i<m; i++)

printf("%s %d\n",pOrder[i].num,

p0rder [i]. s);

free (pOrder);

}

点击查看答案
第7题
下列程序的运行结果是()。 #include <stdio.h> void fun(int *a, int *b) { int *k; k=a; a=b; b=k; } main() { int a=3,b=6, *x=&a, *y=&b; fun(x,y); printf("%d%d",a,b);

A.6 3

B.3 6

C.编译出错

D.0 0

点击查看答案
第8题
#include <iostream.h> class A {int i; public: virtual void fun()=0; A(int a) {i=a;} }; class B:public A {int j; public: void fun() {cout<<"b::fun()\n"; } b(int m,int n="0):A(m),j(n){}" }; void main() {a *pa; b b(7); pa="&amp;b;" 程序第12行有问题,下列()选项修改可使程序正常> A、B(int m,int n=0):j(n){}

B、B(int m,int n=0):A(m) {}

C、B(int m,int n=0):j(n),A(m){}

D、B(int m): j(n){}

点击查看答案
第9题
有以下程序:

include

main()

{int a=1,b=0;

printf("%d,",b=a+b);

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

}

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

A.0,0

B.1,3

C.3,2

D.1,2

点击查看答案
第10题
4.指出下面程序的语法错误: #include <reg51.h> main(){ a=C; int a=7,C delay(10) void delay();{ cgar i; for(i=O; i<=255; ”++”); }>
点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信