ROSY said:
1.How to make self deletable .exe file such that during runtime the
file delete itself from the current path.
#include <stdio.h>
#include <string.h>
int main(void) {
char buffer[100];
printf("What is the name of this .exe file?\n");
fgets(buffer, sizeof buffer, stdin);
if (buffer[strlen(buffer)-1] == '\n')
buffer[strlen(buffer)-1] = '\0';
remove(buffer);
return 0;
}
--
/-- Joona Palaste (
[email protected])
---------------------------\| Kingpriest of "The Flying Lemon Tree"
G++ FR FW+ M- #108 D+ ADA N+++||
http://www.helsinki.fi/~palaste
W++ B OP+
|\----------------------------------------- Finland rules!
------------/"Remember: There are only three kinds of people - those
who can count and those who can't."
- Vampyra