From 10076048422650dfa67ccca511a0052ada641467 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Sun, 2 Aug 2020 21:57:57 +0700 Subject: [PATCH] Fixed the largest avg find --- work1/single.c | 4 ++++ 1 file changed, 4 insertions(+) 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; }