Question: Which of the following C language code is used to create a new node in the singly linear linked list. A. ptr = (LIST*) malloc(sizeof(LIST));
Which of the following C language code is used to create a new node in the singly linear linked list.

A. ptr = (LIST*) malloc(sizeof(LIST));
B. *ptr = (LIST*) malloc(LIST);
C. ptr = (LIST*) malloc(sizeof(LIST*));
D. ptr = (LIST) malloc(sizeof(LIST));
{ } struct node int data; struct node * next; typedef struct node LIST; LIST*ptr;
Step by Step Solution
3.46 Rating (159 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
