store files permanently


I have a PC104 with flash card, and I want store some files permanently, but
I don´t know how do it. I´m interested in store in a hard disk too.

I program in C, and I create some files (p.e: with fopen, fwrite,… fclose
functions), but only in /tmp directory, but when I reset PC104, the files
dissapear (I suppose that because it is a temporal directory???).
How can I store files in others directories? Problems with permissions?

Can someone help me? I don´t kown where I can get information about this.

Juan Carlos.