Quite frankly, this looks like the quite common case of some jerk not paying attention in class, expecting that he or she can get their work done, well and for free, on some forum. Review your materials regarding how to get an argument from the command line (hint: argc/argv), and how to remove or delete a file with the functions available in the Unix/Linux API. You may get some newb showoff who will write this for you, thus generating another person we have to watch out for when we're hiring. You won't get it from me.