Examveda

What will the following C code do on compilation?
void main () 
{
   char com[50];  
   strcpy( com, "dir" ); 
   system(com); 
}

A. error

B. lists down all the files and directories in the current directory under windows machine

C. terminates the calling process immediately

D. calls specified function and terminates it at the end of the program

Answer: Option B


This Question Belongs to C Program >> Standard Library Functions

Join The Discussion

Related Questions on Standard Library Functions