1
#include<stdio.h> struct student{ int age; char name[10]; }; int main(void) { int i,index,j,n; struct student students[3],temp; for(i=0;i<=3;i++){ scanf("%d\t %s\t",&students[i].age,&students[i].name); } for(i=0;i<n-1;i++){ index=i; for(j=i+1;j<n;j++) if(students[j].age<students[index].age) index=j; temp=students[index]; students[index]=students[i]; students[i]=temp; } for(i=1;i<=4;i++){ printf("%d%s\n",students[i].age,students[i].name); } return 0; }