I'm trying to write username and password to a new line in a txt file. In both case, the pointer starts from the end of the file. Anyway, I did my research on fwrite(), but I couldn't find solution, so i'm asking for help. We can use the file handling functions like fopen (), fwrite (), and file close () to create a file and write some text in it.