As I indicated, the recursive function can be simplified and then it becomes even clearer how it works,
Code:void ReadListBackward(node* p) { if (!p) { printf("T!\n"); // recursion terminates } else { printf("F: %d\n", p->data); // print in forward direction ReadListBackward(p->next); // recursive call printf("B: %d\n", p->data); // print in backward direction } }





Reply With Quote