This is how i print recursively a list
Code:
if (mylist_ptr == NULL) {
return ;
}
printf("%s: ", mylist_ptr->value);
report(mylist_ptr->next);
return ;
Now i want to print a list which has elements other lists,same way(recursively).
This is how my list looks like ,but ofc i want it for any number of lists.
Sorry for the quality..
EDIT:Each sublist ends with a node with a NULL in its next field
Also the stucts for the sublists and the listoflsits :
Code:
struct node {
char value[20] ;
struct node* next ;
} ;
typedef struct node Node;
typedef Node * List;
struct listoflists{
List list;
struct listoflists*next;
} ;
typedef struct listoflists Listoflists;