0

Hey,

How do I create a file from a C program? I want to check if the file exists and if it doesnt, then create it. I am using the following code to check if it exists:

filecheck()
{
	b=fopen("password.csv","r+w");
	if(b==NULL)
	{

         // need code for creating a file
       }
}
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by venomxxl
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.