ÿÿ at the end of file i created

I am writing data to a file in my program and it is writing ÿÿ to the very end.
What is it and why is it writing that to file?

Who is Participating?
efnConnect With a Mentor Commented:
Probably you copied the end-of-file indicator from an input file.

That character has a binary value of 255, which is -1 as a signed number.  Two of those is a 16-bit -1.  -1 is commonly used as the EOF value that marks the end of the file when a program is reading input with getc or getchar.

whinsonAuthor Commented:
All Courses

From novice to tech pro — start learning today.