Let's say I have a file test.c which accepts a text file and starts as follows:
int main(int argc, char **argv)
{
  ...
  return 0;
}
I will typically compile the file and execute the binary as follows: ./test input.txt.
Now, I wish to call the main function programmatically in another function in the same file. How should I proceed?
 
    