In a function with return type void, what is the meaning of the statement return;

How?

if(head == NULL) return;    // Leave if nothing left to do
fun1(head->next);           // Process the next (later) element now with recursion
printf("%d  ", head->data); // Print the current element

return; simply ends the function it is executed in, only valid in functions with return-type void.

Leave a Comment