mc_pi.c:49:18: warning: implicit declaration of function 'getopt' is invalid in C99 [-Wimplicit-function-declaration]
while ((flag = getopt(argc, argv, "hn:v")) != -1) {
^
mc_pi.c:52:21: error: use of undeclared identifier 'optarg'
trials = atoi(optarg);
^
1 warning and 1 error generated.