How to use structure within structure and function within structure?
is there recursion possible in structure?
How to use structure within structure and function within structure?
is there recursion possible in structure?
AbHHinaay
>>is there recursion possible in structure?
>
>No.
That's correct. But what you can do is let the structure contain a pointer to a variable of the same type as the structure.
Now you can allocate memory for a structure of type struct node and let pnode point to that structure.Code:struct node { int data; struct node *pnode; };