fopen mode:
r or rb pen a file in read only mode
w or wb : open a file in write mode. if the file exist, it is truncat to 0,else create new file.
...
can you show us the detail?
int main()
{
FILE *fp;
if ((fp=fopen("output.txt","w+"))==NULL)
printf("Can not open the output file\n");
return 0;
}
[/code:1]