#include #include #include #define SIZE 100 struct student { char name[SIZE]; int score; }; int compar(const void*,const void*); int loading_the_entire_line_from_standard_input_into_the_helper_field_and_verify_that_i_have_loaded_it_correctly(struct student *databaza,int *size_ptr); int parce_line_and_save_into_database(char line[],struct student *databaza, int *size_ptr); int find_index(struct student databaza[],int size, const char *xxx); void adding_an_item_to_the_database(struct student databaza[],int *size_ptr, const char* name,int score); int main() { struct student databaza[SIZE]; memset(databaza,0,SIZE*sizeof(struct student)); int size = 0; while(loading_the_entire_line_from_standard_input_into_the_helper_field_and_verify_that_i_have_loaded_it_correctly(databaza,&size)){ } int element_size=SIZE+sizeof(int); qsort((void *)databaza, size,element_size,compar); printf("Vysledky:\n"); for(int i=0; iscore < b_ptr->score) { return 1; } if(b_ptr->score > a_ptr->score) { return -1; } return strcmp(a_ptr->name, b_ptr->name); }