#include<stdio.h>
void main()
{
FILE *fptr;
if((fptr=fopen("test.txt","w"))!=NULL)
{
fprintf(fptr,"this is a test file.");
fclose(fptr);
}
else
printf("error");
}
void main()
{
FILE *fptr;
if((fptr=fopen("test.txt","w"))!=NULL)
{
fprintf(fptr,"this is a test file.");
fclose(fptr);
}
else
printf("error");
}