Function pointer to different functions with different arguments in C
I have two functions with variable number and types of arguments double my_func_one(double x, double a, double b, double c) { return x + a + b + c } double my_func_two(double x, double p[], double c) { return x + p[0] + p[1] + c } I want to use a pointer to a function to the functions I defined above based on a some condition getting true e.g. if (true == condition_1) pfunc = my_func_one; else if (true == condition_2) pfunc = my_func_two; // The function that will use the function I passed to it swap_function(a, b, pfunc); My question is, for this scenario, Can I at all define a function