Skip to content

Commit

Permalink
Create main.c
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasDiasJorge committed Jan 29, 2025
1 parent 3f0774b commit 4ba1223
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Files/Delete/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <stdio.h>
#include <unistd.h>

int main() {
const char *file = "data/file1.txt";

if (unlink(file) == 0) {
printf("Arquivo %s removido com sucesso!\n", file);
} else {
perror("Erro ao remover o arquivo");
}

return 0;
}

0 comments on commit 4ba1223

Please sign in to comment.