Program to find length of linked list using Recursion

August 29th, 2009  |  by  |  published in Amit Sahrawat, Data Structures, Linux Sample Programs

/* Structure for a linked list*/ struct list{     int num;     struct list* next; /* pointer to next node in list*/ }; /* Function to find the length of linked list using recursion, given the starting node pointer*/ int length(struct list* node) {

Subscribe

Get articles in your inbox.

Enter your email address:

Join Us

Twitter Chatter


Recommendations

Archives

Categories