In C, the following syntax is used to create a node in a singly linked list:
struct node
{
int data;
struct node *next;
};
struct node *head, *ptr;
ptr = (struct node *)malloc(sizeof(struct node));
robort - 2022-10-03 02:36:02
In C, the following syntax is used to create a node in a singly linked list:
struct node
{
int data;
struct node *next;
};
struct node *head, *ptr;
ptr = (struct node *)malloc(sizeof(struct node));
Top Interviews