Question: Modify the code to use the following data type. Mark the changes at the code. (20 points) typedef struct TreeNode *TreePointer Problem 3 [20
Modify the code to use the following data type. Mark the changes at the code. (20 points) typedef struct TreeNode *TreePointer Problem 3 [20 points] #include #include typedef struct TreeNode { mmmmmm int data; } TreeNode; void main () { } www struct TreeNode *left; struct TreeNode *right; ~ TreeNode *n1, *n2, *n3; wwwmmmmm (TreeNode *) malloc(sizeof (TreeNode)); n2 = (TreeNode *) malloc (sizeof (TreeNode)); (TreeNode *) malloc (sizeof (TreeNode)); m n1->data=10; nl->left=n2; nl->right=n3; n2->data=20; n2->left=NULL; n2->right=NULL; n3->data=30; n3->left=NULL; n3->right=NULL return;
Step by Step Solution
There are 3 Steps involved in it
The task here is to modify the given C code to use the data type TreePointer instead of using struct ... View full answer
Get step-by-step solutions from verified subject matter experts
