In this case, it's in the same folder as the application.
If the file includes a path, then all the backslashes must be doubled up.
This code sample shows a simple binary file being opened for writing, with a text string (char *) being written into it.
Normally you see this with a text file, but you can write text to a binary file.
The FILE * variable is returned from the fopen() call.The important part is the data stream rather than where it came from.In C, you can think about the data either as files or streams.It's a little onerous if you are after performance, so you might limit this to debugging.On Windows, there is little overhead outputting text to the system debugger. The second and third parameters are the size of the characters and the length of the string.With random access, you can read or write to any part of the file or stream.With sequential access, you have to loop through the file or stream from the start like a big tape.The first four operations listed above are for both text and random access files. Random access means you can move to any part of a file and read or write data from it without having to read through the entire file.Years ago, data was stored on large reels of computer tape.When you open a file, you specify how it is to be opened—whether to create it from new or overwrite it and whether it's text or binary, read or write and if you want to append to it.This is done using one or more file mode specifiers that are single letters "r", "b", "w", "a" and " " in combination with the other letters.