C program source code to create file in file handling

C program source code to create file in file handling


Write a C program  to create file in file handling

C Program source code

#include<stdio.h>
#include<conio.h>
int main()
{
FILE *fptr;
fptr=fopen("Test.txt","w");
if(fptr==NULL)
{
printf("\nFile can not be opened");
}
else
{
printf("File is succesfully created");
}
fputs("welcome to c programming",fptr);
fclose(fptr);
getch();

return 0;

}



You can Browse related article below for more information and program code related to recursive function call

 Does above is helpful , Post you views in comment

DO NOT MISS OTHER C PROGRAMMING TUTORIAL

* indicates required



Comments

Popular posts from this blog

C- Computer programming language-field of study

C++ Input/Output : Streams

Print pattern in c - explore new perspectives in pattern printing