जॉइन Examsbookउत्तर :
Improve the following code using typedef.
struct node
{
int data1; float data2;
struct node *left;
struct node *right;
};
struct node *ptr;
ptr = (struct node *) malloc (sizeof (struct node) );5
प्र: Improve the following code using typedef. struct node { int data1; float data2; struct node *left; struct node *right; }; struct node *ptr; ptr = (struct node *) malloc (sizeof (struct node) );
- उत्तर देखेंउत्तर छिपाएं
- Workspace
उत्तर :
व्याख्या :
typedef struct node * treeptr typedef struct node { int data1; float data2; treeptr *left; treeptr *right; }treenode; treeptr ptr; ptr = ( treeptr ) malloc ( sizeof ( treenode ) );

