So if I was given a the following 2 functions:
void printhex(int x, char y, char z)
{
printf("%x%x%x,x,y,z);
}
void printdecimal( int x, char y ,char z)
{
printf("%i%i%i,x,y,z);
}
How would i define a variable, that is a function pointer, that can be assigned either of the 2 given functions?
Also within the main function how would i determine if any command line arguments were entered after the program name when the program was executed. If anything was entered, how would I be able to assign the function pointer to the function printhex, but otherwise would assign the function to printdecimal?