Check out example codes for "is it possible to access argv in function". It will help you in understanding the concepts better.

Code Example 1

void function(int argc, char *argv[])
{
    // whatever you want
}

Learn ReactJs, React Native from akashmittal.com