Implement two short programs, in two different programming languages
of your choice( mainly c, c++, fortran), that reverse a linked list. For example, using C,
and starting with a linked list represented by the structure
struct List_t {
int item;
struct List_t *next;
};
implement the function
struct List_t *reversel(struct List_t *list);
that takes the list 'list' and returns the list but with the order
of the nodes reversed.
of your choice( mainly c, c++, fortran), that reverse a linked list. For example, using C,
and starting with a linked list represented by the structure
struct List_t {
int item;
struct List_t *next;
};
implement the function
struct List_t *reversel(struct List_t *list);
that takes the list 'list' and returns the list but with the order
of the nodes reversed.