Q. Consider the following definition in c programming languagestruct node{int data;struct node * next;}typedef struct node NODE;NODE *ptr;Which of the following c code is used to create new node? (Solved)
1. ptr=(node*)malloc(sizeof(node));
2. ptr=(node*)malloc(node);
3. ptr=(node*)malloc(sizeof(node*));
4. ptr=(node)malloc(sizeof(node));
- a. ptr=(node*)malloc(sizeof(node));