Tuesday, July 14, 2009

How to write a program in c that will delete itself after execution?

Here is a hint. argv[0] contains the name of the executable file:





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


{


printf("I am %s\n",argv[0]);


}


No comments:

Post a Comment