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 is the difference between prefix and postfix versions of operator++()?
Write about the access privileges in c++ and also mention about its default access level?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
Describe the setting up of my member functions to avoid overriding by the derived class?
What is encapsulation in C++? Give an example.
Describe the syntax of single inheritance in C++?
Why cout is used in c++?
What are static type checking?
How is modularity introduced in C++?
What is a modifier in c++?
How to declare a function pointer?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
What is operators in c++?
Explain the different access specifiers for the class member in c++.