hi all,
Suppose, I have a string stored in a character array. I want this string to be stored in a file. If I do fopen and use the write mode ,the contents of this file will be junk.. How can I store the string as it is inside the file?
please help,

Seems like you just need a file input/output tutorial in c.

Consult google.

post code. Since you use fopen() I assume this is a C and not C++. After fopen, just use fprintf() then fclose().

char strp[] = "Hello World";
FILE* fp = fopen("myfile.txt","w");