题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-01-29 00:56:47

[填空题]以下程序的运行结果是 【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); }

更多"以下程序的运行结果是 【12】 。 # include<strin"的相关试题:

[填空题]以下程序的运行结果是【 】   #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 #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
[填空题]

以下程序的运行结果是  【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);

[填空题]以下程序的运行结果是 【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("%1d%s/n",d.sno,p->name); }
[填空题]以下程序的运行结果是 【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("%1d%s/n",d.sno,p->name);

[填空题]

以下程序运行时输出到屏幕的结果中第一行是()第二行是()
#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);
}


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

[填空题]

以下程序运行时输出结果中第-行是(),第二行是(),第三行是()
#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 <string.h>
typedef struct student
char name[10];
long sno;
float score;
STU;
main( )
STU a= "Tianjin",2001,95 ,b="Shanghai",2002,90,
c= "Han’gu",2003,95),d,*p=&d;
d=a;
if(strcmp(a.name,c.name)>0) d=c;
if(strcmp(b.name,d.name)>0) d=b;
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
我已记住账号密码