Searching in a Binary Search Tree
Yes... You can also practice with an implementation of your own. I have created such an implementation and a good test is to compile this with different optimization levels in gcc:

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;

typedef struct node {
    int node_id;
    int data;
    char *name;
    struct node *left;
    struct node *right;
} node;

node *newNode(int data, char *name, int node_id) {
    node *new_node = malloc(sizeof(node));
    new_node-&gt;data = data;
    new_node-&gt;name = name;
    new_node-&gt;node_id = node_id;
    new_node-&gt;right = new_node-&gt;left = NULL;
    return new_node;
}

node *insert_node(node *root, int data, int node_id, char *name) {
    if (root == NULL)
        return newNode(data, name, node_id);
    else {
        node *cur;
        if (node_id &lt; root-&gt;node_id) {
            cur = insert_node(root-&gt;left, data, node_id, name);
            root-&gt;left = cur;
        } else if (node_id &gt; root-&gt;node_id) {
            cur = insert_node(root-&gt;right, data, node_id, name);
            root-&gt;right = cur;
        }
    }
    return root;
}

node *find_node_data(node *root, int node_id) {
    if (root == NULL)
        return NULL;
    else if (root-&gt;node_id == node_id)
        return root;
    else if (root-&gt;node_id &gt; node_id)
        return find_node_data(root-&gt;left, node_id);
    else
        return find_node_data(root-&gt;right, node_id);
}

void print(node *np) {
    if (np) {
        print(np-&gt;left);
        printf("(%d, %d, %s)", np-&gt;node_id, np-&gt;data, np-&gt;name);
        print(np-&gt;right);
    }
}

int main() {
    int T = 1000; //test case 1000 nodes
    int data, r2, r;
    int node_id = 0;
    //printf("Input number of nodes:");
    //scanf("%d", &amp;T);
    node *root = NULL;
    srand(time(NULL));
    while (T-- &gt; 0) {

        //scanf("%d %d", &amp;data, &amp;node_id);
        r = (2 + T) * rand() % 100; //node id
        r2 = (2 + T) * (rand() % 100); // data
        printf("Input data. %d:\n", r2);
        printf("node id. %d:\n", r);
        root = insert_node(root, r2, r, "foobar");
    }
    print(root);
    // printf("\n");
    // printf("Find data at node:");
    // scanf("%d", &amp;T);
    print(find_node_data(NULL, node_id));
    T = r;
    printf("node data %d %s", find_node_data(root, r)-&gt;data, find_node_data(root, r)-&gt;name);
    root = NULL;
    // find_node_data(root, T)-&gt;data;
    print(root);
    return 0;
}