c language - Validating User Input via function
===

I need to validate user input using separate function.
For example, programing is asking for input in functionA and validation code should be in FunctionB ... I know all the ifs and while statement for validation but I cant figure out how to use two separate function for this... Here is the sample run..



        #include <stdio.h>
       void get_input (int * inp);
       double valid_input (void);
    
       main () {
    
        get_input (&inp);
        valid_input ();
    
       }
    void get_input (int *inp)
    {
      printf("enter something");
      scanf("%d", &inp);
    }
    
    double ()
    {
     // what to put here ?
    }

