What will the following C code do on compilation?
void main ()
{
char com[50];
strcpy( com, "dir" );
system(com);
}
Answer: B
int system(const char *command) function is used to pass the command name or the program name specified by command to the host environment to be executed by the command processor and returns after the command has been completed.