Question: Write C statements for a struct containing name : an array of 32 chars key : an integer child : pointer to the first child
Write C statements for a struct containing
name : an array of 32 chars
key : an integer
child : pointer to the first child node
sibling : pointer to the next sibling node
parent : pointer to the parent node
A tree is implemented as a BINARY tree by the child and sibling pointers.
Assume: struct node *p points at a parent node A.
struct node *q points at a new node.
struct node *r points at an EXISTING child node of A.
Write C code to ADD q as a child of A.
Write C code to DELETE q from the children of A.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
