

MCQOPTIONS
Saved Bookmarks
1. |
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? |
A. | ptr=(node*)malloc(sizeof(node)); |
B. | ptr=(node*)malloc(node); |
C. | ptr=(node*)malloc(sizeof(node*)); |
D. | ptr=(node)malloc(sizeof(node)); |
Answer» B. ptr=(node*)malloc(node); | |