题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-16 18:01:42

[填空题]

以下程序运行时输出到屏幕的结果中第一行是()第二行是()
#include
Typedef struct
{int dm; /*产品代码*/
Char *mc; /*产品名称*/
Long je; /*金额*/
}PRO;
Void main( )
{ int I j,k,n=3;
PRO
sell[10]={{101,apple,100},{301,orange,100},{101,apple,200}},xy;
For(i=0;i { k=I;
For(j=i+1;j If(sell[k].dm If(k!=i)
{xy=sell[i];
Sell[i]=sell[k];
Sell[k]=xy;
}
}
For(i=0;i Printf(%15d%10s%5d/n,sell[i].dm_sell[i].mc.sell[i].je);
}


更多"以下程序运行时输出到屏幕的结果中第一行是()第二行是() #inclu"的相关试题:

[填空题]以下程序运行时输_出到屏幕的结果第一行是 【17】 ,第二行是 【18】 。 #include typedef struct fact { int m,z; }FACT; FACT fun1(FACT t1,FACT t2) {FACT t3; t3.m=t1.m*t2.m ; t3.z=t1.z*t2.m+t2.z*t1.m; retum t3; } FACT fun2(FACT t) {int m,n,k; m=t.m; n=t.z; while(k=m%n) { m=n;n=k; } t.m=t.m/n; t.z=t.z/n; return t; } void main( ) {FACT s,s1={8,4},s2={6,5}; s=fun1(sl,s2); printf("%d,%d/n",s.z,s.m); s=fun2(s); printf("%d,%d",s.z,s.m); }
[单项选择]有以下程序 #include #include typedef struct {char name[9]; char sex; int score[2]; } STU; STU f(STU a) { STU b={"Zhao",’m’,85,90}; int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b. score[i]; return a; } main( ) { STU c={"Qian",’f’,95,92}, d; d=f(c); printf("%s,%c,%d,%d,",d.name, d.sex, d.score[0], d.score[1]); printf("%s,%c,%d,%d/n",c.name, c.sex, c.score[0], c.score[1]); } 程序运行后的输出结果是_______。
A. Zhao,m,85,90,Qian,f,95,92
B. Zhao,m,85,90, Zhao,m,85,90
C. Qian,f,95,92, Qian,f,95,92
D. Qian,f,95,92, Zhao,m,85,90
[单项选择]有以程序
#include
#include
typedef struct char name[9]; char sex; float score[2]; STU;
void f( STU a)
STU b="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( )
STU c="Qian",’f’,95.0,92.0;
f(C); printf("%s,%c,%2.0f,%2.0f/n",c.name,c.sex,c.score[0],c.score[1]);程序的运行结果是______。
A. Qian,f,95,92
B. Qian,m,85,90
C. Zhao,f,95,92
D. Zhao,m,85,90
[填空题]

以下程序运行时输出结果中第-行是(),第二行是(),第三行是()
#include
typedef struct{int x;int y;}S;
void fun(S pp[],int n)
{int i,j,k;S t;
for(i=0;i { k=i;
for(j=i+1;j if((pp[j].x k=j;
if(k!=i)
{t=pp[i];pp[i]=pp[k];pp[k]=t;}
}
}
void main( )
{S a[5]={{3,2},{3,1},{1,2},{2,4},{2,3}};
int i,n=5;
fun(a,n);
for(i=0;i printf("%d,%d/n",a[i].x,a[i].y);
}


[填空题]有以下程序 #include<stdio.h> typedef struct { int num;double s; }REC; void funl(REC *x) { x->num=23;x->s=88.5; } void main( ) { REC a={16,90.0}; fun1(&a); printf("%d/n",a.num); } 程序运行后的输出结果是______。
[填空题]有以下程序
#include<stdio.h>
typedef struct

int num;double s;
REC;
void funl(REC *x)

x->num=23;x->s=88.5;

void main( )

REC a=16,90.0;
fun1(&a);
printf("%d/n",a.num);

程序运行后的输出结果是______。
[填空题]有以下程序:
#include<stdio.h>
typedef struct
int num;double s;)REC;
void funl(REC x)x.num=23;x.s=88.5;
main( )
REC a=16,90.0);
fun1(a);
printf("%d/n",a.num);

程序运行后的输出结果是______。
[单项选择]有以下程序: #include <stdio.h> typedef struct { int b, p; }A; void f(A c)/* 注意:c是结构变量名*/ { int j; c.b+=1; c.p+=2; } main( ) { int i; A a={1, 2}; f(a); printf("%d, %d/n", a.b, a.P); } 程序运行后的输出结果是______。
A. 2, 4
B. 1, 2
C. 1, 4
D. 2, 3
[单项选择]有以下程序:
#include <stdio.h>
typedef structint b, p; ) A;
void f(A c) /*c是结构变量名*/
int j;
c.b+=1; c.p+=2;

main( )
int i;
A. printf("%d, %d/n", a.b, a.p); 程序运行后的输出结果是()。 2, 3
B. 2, 4
C. 1, 4
D. 1, 2
[填空题]以下程序的运行结果是【 】   #include <string.h>   typedef struct student{    char name[10];    long sno;    float score; }STU;   main( )   { STU a={“zhangsan”,2001,95},b={“Shangxian”,2002,90},       c={“Anhua”,2003,95},d,*p=&d;    d=a;    if(strcmp(a.name,b.name)>0) d=b;    if(strcmp(c.name,d.name)>0) d=c;    printf(“%ld%s/n”,d.sno,p->name); }
[填空题]

有以下程序
#include<stdio.h>
typedef struct
{int num;double s;}REC;
void funl(REC x){x.num=23;x.s=88.5;}
main( )
{ REC a=<16,90.0};
funl (A) ;
printf("%d/n",a.mum);
}
程序运行后的输出结果是______。


[填空题]

以下程序的运行结果是  【19】 
  #include <string.h>
  typedef struct student{
   char name[10];
   long sno;
   float score; }STU;
  main( )
  { STU a={“zhangsan”,2001,95},b={“Shangxian”,2002,90},
      c={“Anhua”,2003,95},d,*p=&d;
   d=a;
   if(strcmp(a.name,b.name)>0) d=b;
   if(strcmp(c.name,d.name)>0) d=c;
   printf(“%ld%s/n”,d.sno,p->name);


[填空题]以下程序的运行结果是 【12】 。 # include<string.h> typedef struct student{ char name[10]; long sno); float score } STU; main( ) { STU a={"zhangsan",2001,95},b={"Shangxian",2002,90} c={"Anhua",2003,95},d,*p=&d; d=a; if(strcmp(a.name,b.name)>0)d=b; if(strcmp(c.name,d.name)>0)d=c; printf("%1d%s/n",d.sno,p->name); }

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码