Question: Just a question regarding a C function. So my function is the following: node* node_insert (node *root, char* data, int (*cmp)(const void* x, const void*

Just a question regarding a C function.

So my function is the following:

node* node_insert (node *root, char* data, int (*cmp)(const void* x, const void* y));

The (*cmp) would be a comparison function. I wrote a function with the following parameters:

void* mem_ex (const void *x, const void *y);

I'm just wondering how I would call node_insert in main.

Would I do something like:

node_insert(*pointer, *pointer, mem_ex(*pointer, *pointer))

or

node_insert(*pointer, *pointer, *mem_ex){

TO_DO

cmp(*pointer, *pointer)}

or something else I can't quite think of.

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!