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 is cin clear () in c++?

707


What does floor mean in c++?

673


What is the use of pointer in c++ with example?

642


Is it possible to use a new for the reallocation of pointers ?

678


What's the best free c++ profiler for windows?

718






Do inline functions improve performance?

737


What is a c++ vector?

691


How do I get good at c++ programming?

719


What is #include cmath?

734


What is runtime errors c++?

674


What is c++ map?

661


What is c++ coding?

759


How does class accomplish data hiding in c++?

783


Write about the members that a derived class can add?

656


What is time_t c++?

685