Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions