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
What apps are written in c++?
Why cout is used in c++?
How do I use arrays in c++?
What are the manipulators in c++?
Mention the purpose of istream class?
Why do we use iterators?
What is format for defining a structure?
What are pointers used for c++?
Can member functions be private?
Explain the difference between overloading and overriding?
What is a block in c++?
What is the difference between the functions rand(), random(), srand() and randomize()?
what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?
What are the various access specifiers in c++?
Show the declaration for a pointer to function returning long and taking an integer parameter.