cjqdlbbcyyej 2021-06-27 20:13 采纳率: 66.7%
浏览 23
已采纳

C语言二级考试填空题

#include  <stdio.h>
#include  <string.h>
struct student {
  long  sno;
  char  name[10];
  float  score[3];
};
void fun(struct  student  a)
{ struct student  b;    int  i;
/**********found**********/
   b = __1__;
   b.sno = 10002;
/**********found**********/
   strcpy(__2__, "LiSi");
   printf("\nThe data after modified :\n");
   printf("\nNo: %ld  Name: %s\nScores:  ",b.sno, b.name);
/**********found**********/
   for (i=0; i<3; i++)  printf("%6.2f ",  b.__3__);
   printf("\n");
}
main()
{ struct student  s={10001,"ZhangSan", 95, 80, 88};
  int  i;
  printf("\n\nThe original data :\n");
  printf("\nNo: %ld  Name: %s\nScores:  ",s.sno, s.name);
  for (i=0; i<3; i++)  printf("%6.2f ",  s.score[i]);
  printf("\n");
  fun(s);
}
 

  • 写回答

1条回答 默认 最新

  • CSDN专家-link 2021-06-27 20:17
    关注

    b=a;

    strcpy(b.name,"LiSi");

    printf("%6.2f ",  b.score[i]);

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件