
Implement a function that walks a singly linked list and invokes a caller-provided callback on the payload of each node.
list_apply([7 -> 8 -> 9], print_data)Expected result
[7][8][9]For your own tracking. Tests grade your code.
list_apply(NULL, print_data)Expected result
(nothing printed)Expected files
list_apply.cAllowed functions
None. Write every helper yourself.
Allowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement a function that walks a singly linked list and invokes a caller-provided callback on the payload of each node.
list_apply([7 -> 8 -> 9], print_data)Expected result
[7][8][9]For your own tracking. Tests grade your code.
list_apply(NULL, print_data)Expected result
(nothing printed)Expected files
list_apply.cAllowed functions
None. Write every helper yourself.
Allowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.