Question: 9. Consider the following declaration struct node t int zip_code; char name [20]; struct node *left; struct node *right; typedef struet node node type Provided

9. Consider the following declaration struct node t int zip_code; char name [20]; struct node *left; struct node *right; typedef struet node node type Provided that zip_code is used as the key for creating a Binary Search Tree (BST of node_type nodes, write a C function search that takes target along with the root of a BST and searches for target in the tree. If target is found, your function should copy its associated name to answer and return 1; otherwise return 0. Note that answer is the third parameter defined in function search. You may use any C library functions you choose. Ifyou write "dont grade" or leave the answer blank, we will not grade any ofyour work for this problem and you will receive 2 points int search (int target, node_type *root, char *answer)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
