Print an array and a linked list recursively. Hint: First, find and implement an appropriate base case for the function.
Use the following incomplete function definitions.
Array
void printArray(int arr[], int n) {
//...
}
Linked List
void printList(Node *head) {
// . . .
}
- Previous
- Next