Anonymous user
Singly-linked list/Reversal: Difference between revisions
m
→C
imported>StraightDoubt (Added a routine for the language C.) |
imported>StraightDoubt m (→C) |
||
Line 49:
== C ==
This code works by reversing the pointers in the list. The function returns the new beginning of the list, or NULL if passed a null pointer.
<syntaxhighlight lang="C">
#include <stdlib.h>
Line 67 ⟶ 70:
return prev;
}
</syntaxhighlight>
=={{header|Delphi}}==
|