-->
当前位置:首页 > 题库 > 正文内容

单选题:输出程序结果

Luz3年前 (2022-11-02)题库700

#include <stdio.h>

typedef struct
{
char name[10];
int no;
float score;
}INFO;

void swap(INFO a)
{
float t;
t=a[0].score;
a[0].score=a[1].score;
a[1].score=t;
}

int main()
{
INFO x[2]={{"one",1001,89}, {"two",1002,75}};
swap(x);
printf("%s,%d,%.2f\n", x[1].name, x[1].no, x[1].score);
return 0;
}






A.one,1001,89.00
B.two,1002,75.00
C.one,1001,75.00
D.two,1002,89.00


答案:D

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。