This is a quick question, I did a search but couldn't find anything that answered my question.
When doing a recursive function in C do you need to have a return even when using a void function?
Eg:
void addToLL(structA_ptr new, structA_ptr cur) {
if (cur->next == NULL) {
cur->next = new;
} else {
addToLL(new, cur->next);
}
}
Would I need to put a return keyword before the call to the function? I know that if the function would return something, like searching for something in the LL it would need a return statement.