Is there a way in c for us to create a linked list struct where the next node value be NUll by default like in java we can do
class Node{
int data;
Node next
Node(int d){
data=d;
next=NULL;
}
}
here the next value is by default initialised to NULL is there any way to do this in c.
i dont want to do it in the main function so that code for creating a linked list will be smaller