diff --git a/work1/single.c b/work1/single.c index 135a408..e778065 100644 --- a/work1/single.c +++ b/work1/single.c @@ -271,6 +271,10 @@ STUDENT *find_maximum_avg() temp = temp->next; } + // set max next element to NULL + // because we use only one record + max->next = NULL; + return max; }