当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

有以下程序struct STU{char name[10];int num;int Score;};main(){ struct STU s[5]={{"YangSan"


有以下程序struct STU{ char name[10]; int num; int Score;};main(){ struct STU s[5]={{"YangSan",20041,703}, {"LiSiGuo",20042,580}, {"WangYin",20043,680}, {"SunDan",20044,550}, {"Penghua",20045,537}}, *p[5], *t; int i,j; for(i=0;i<5;i++) p[i]=&s[i]; for(i=0;i<4;i++) for(j=i+1;j<5;j++) if(p[i]->Score>p[j]->Score) { t=p[i]; p[i]=p[j]; p[j]=t; } printf("%d %d ",s[1].Score,p[1]->Score);}程序运行后的输出结果是A.550 550 B.580 550 C.680 680 D.580 680

参考答案
您可能感兴趣的试题
  • 根据下列的定义,能打印出字母P的语句是() struct stu {char name[10]; int age; }; stmct stu s[

  • 有以下程序#include &lt;stdio.h&gt;struct stu{ int num; char name [10];int age;};Void fun(s

  • 有以下程序段struct STU{ char num[10];float score[3];};main(){ struct STU s[3]={ {"20021"

  • 以下程序的输出结果是______。#includestruct stu{int num; char name[10]; int age;};v

  • 有以下程序:#include struct STU{char name[10]; int num; int Score;};main(){struct

  • 有以下结构体说明 变量定义和赋值语句 struct STD { char name[10];