I had just tried out a program to reverse print a singular linked list.
Assume that the linked list is ready with 5 elements:
1->2->3->4->5
I had written a program to print in reverse order like: 5 4 3 2 1
But my program just prints as 5 4 3 2
; the 1
is not printing. Why?
int Reverse_List(abc_t *pNode) {
abc_t *pTemp;
int count = 5;
if (pNode->pNext != NULL) {
pNode = pNode->pNext;
Reverse_List(pNode);
printf("The node is %d\n", pNode->a);
}
}