Sail E0 Webinar
Question


If the following program (myproc.c) is present in the directory "C:TC" then what will be output of the program if run it from DOS shell?


/* myproc.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%s", argv[0]);
return 0;
}
Options:
A .  SAMPLE.C
B .  C:TCMYPROC.EXE
C .  C:TC
D .  Error
Answer: Option B

In order to execute it from DOS shell, we have to run the created EXE file by 

entering the exe file name as C:TC>myproc <enter>.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers