main

Function calling main function

Multiple choice question

What is the output of the following code:

#include <stdio.h>

void m(int argc, char *argv[])
{
   main(argc,argv);
}

void main(int argc, char *argv[])
{
   if (argc>0)
   {
     printf("%s\n", *argv);
     argc--;
     argv++;
     m(argc,argv);
   }
}

valid main declaration

Multiple choice question

Which of the following is a valid declaration for main() function?

to what does *argv usually correspond

Multiple choice question

In the following declaration of main, to what does *argv usually correspond?

int main(int argc, char *argv[])

main function return value

Multiple choice question

If the program completes executing successfully, what value should the function main() return?

Syndicate content