Solution for Exercise 23-8
ex2308
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
if(unlink("wambooli") == -1)
{
puts("I just can't kill that file");
exit(1);
}
puts("File killed");
return(0);
}
Output
File killed
Notes
* If you don't copy the wambooli file to the proper folder for this project in Code::Blocks, the program fails.
Copyright © 1997-2025 by QPBC.
All rights reserved
