1

Consider the following definition in c programming language struct node { int data; struct node * next; } typedef struct node NODE; NODE *ptr; Which of the following c code is used to create new node?

Correct Answer: ptr=(node*)malloc(sizeof(node));

Make the most of this question

This page focuses on one Data Structure and Algorithms (DSA) question from Engineering. After checking the answer, return to the topic list to practice more or run a timed set.

Data Structure and Algorithms (DSA) MCQ: Consider the following definition in c programming language struct node { int data; struct node * next; } typedef struct node NODE; NODE *ptr; Which of the following c code is used to create new node? | Extra Education