How to write a program such that it will delete itself after
exectution?

Answer Posted / pranjali

I guess if your program name is program.c the last line of
your code should be the operating system call to to delete
the file "program.c".

once you compile it to get a .exe , the existance of
program.c is immeterial.

you will hv to take care of necessary error handling.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the general quetions are in DEna bank manager IT/System interviews?

1788


What is near, far and huge pointers? How many bytes are occupied by them?

889


What is a Default constructor?

1233


Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h

876


Explain container class.

951


What is using namespace std in cpp?

766


What are the c++ access specifiers?

1078


What is a stack c++?

763


Is map sorted c++?

745


What is the difference between structure and class?

808


Is c++ a pure oop language?

824


What do the header files usually contains?

811


What are the advantages of early binding?

829


What do you understand by a pure virtual member function?

769


Distinguish between a # include and #define.

865