C writing files✍️

Your video will begin in 10
72 Views
Published
C write append delete file tutorial example explained

#C #write #file

int main()
{
// WRITE/APPEND A FILE
FILE *pF = fopen("C:\\Users\\Cakow\\Desktop\\test.txt", "w");

fprintf(pF, "Spongebob Squarepants");

fclose(pF);

// DELETE A FILE
/*
if(remove("test.txt") == 0)
{
printf("That file was deleted successfully!");
}
else
{
printf("That file was NOT deleted!");
}
*/
return 0;
}
Category
Bro Code
Tags
language, for, beginners
Be the first to comment