#include<stdio.h>
struct student { int num; char name[20]; int score[3]; };
// print函数,用于输出学生成绩数组 void print(struct student stu[], int n) { int i, j; printf("num\tname\tscore\n"); for(i=0; i<n; i++) { printf("%d\t%s\t", stu[i].num, stu[i].name); for(j=0
文章展示了如何在C语言中使用结构体来存储学生的信息,包括学号、姓名和三门课程的成绩。定义了一个print函数来输出这些信息,遍历学生数组并逐个打印每个学生的详细成绩。

被折叠的 条评论
为什么被折叠?



