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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!