To answer your questions in order:
1. The file will be located in the same folder as your code file.
2. Yes.
3. That depends on how your write the command. If you put ios::app at the end, it will append to the file. Otherwise it will erase whats in the file.
To learn more about file I/O, go here:
C++ File I/O Tutorial - Cprogramming.com
I'm basically going by this tutorial and I'm up to this part now. So figured I would try this with a loop to see if I could create a simple program to write to files.