close

Вход

Забыли?

вход по аккаунту

код для вставкиСкачать
Exercise


Use Student_Package3.c and add a
change_grade function. The function should
take as parameters the head of the list, the
ID whose grade we’d like to change, and the
new grade
Hint – Create a new student with the same
name, ID as the old one, with the new grade.
Then remove the old student from the list
and add the new one using the existing
functions
solution
Student_Package4.c
Exercise




Use Student_Package3.c and add a
reverse function:
Student *reverse(Student *head);
The function accepts a linked list of
students and reverses it
Demonstrate the function’s operation
Note: The original list need not be
maintained
solution
reverse.c
Exercise



Implement a linked list where each item
simply contains an integer
Input a number n from the user, and
split the original list into two lists such
that the first contains all the elements
smaller than n, and the other contains
all the others
Display both linked lists on the screen
solution
split_list.c
Exercise




Use Student_Package3.c and add a recursive
reverse function:
Student *rec_reverse(Student *head);
The function accepts a linked list of students
and reverses it
Demonstrate the function’s operation
Note: The original list need not be maintained
solution
rec_reverse.c
1/--страниц
Пожаловаться на содержимое документа