M

Mr. Dubey • 100.69K Points
Coach

Q. 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?

  • (A) ptr=(node*)malloc(sizeof(node));
  • (B) ptr=(node*)malloc(node);
  • (C) ptr=(node*)malloc(sizeof(node*));
  • (D) ptr=(node)malloc(sizeof(node));
Share

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics