Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 the difference between prefix and postfix versions of operator++()?

1079


Write about the access privileges in c++ and also mention about its default access level?

1055


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

996


Describe the setting up of my member functions to avoid overriding by the derived class?

1130


What is encapsulation in C++? Give an example.

1089


Describe the syntax of single inheritance in C++?

1073


Why cout is used in c++?

1024


What are static type checking?

1047


How is modularity introduced in C++?

1209


What is a modifier in c++?

1138


How to declare a function pointer?

992


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?

1075


On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?

1126


What is operators in c++?

1004


Explain the different access specifiers for the class member in c++.

995