C++
Programming and Technical
Programming
Technical
How is fopen()used ?
Read Solution (Total 1)
-
- File pointers are used to open,read,write and close files.
fopen() is used for open a file
int main()
{
FILE *file_ptr;
file_ptr=fopen("data.txt","w");
if (file_ptr!=NULL)
{
printf("file created");
fclose (file_ptr);
return 0;
}
else
{ printf("unable to create file");
return 1;
}
} - 10 years agoHelpfull: Yes(0) No(0)
C++ Other Question