#include #include #define MAXS 21 typedef struct{ char prezime[MAXS]; int prosek; } student; int poredistudente(const void *a, const void *b){ return strcmp(((student*)a)->prezime,((student*)b)->prezime); } int main(){ FILE *f; int n,i; student *s; student trazeni; student *pronadjeni; f = fopen("studenti.txt","r"); if(f==NULL) exit(EXIT_FAILURE); fscanf(f,"%d",&n); s=(student*)malloc(sizeof(student)*n); if(s==NULL) exit(EXIT_FAILURE); for(i=0; iprosek); fclose(f); free(s); return 0; }