 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you the use of F put C function in file handling in C programming. Before starting, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube search. My channel will be available there. You can watch various programming related videos there. Now I am going to implement the solution of this problem that is to implement use of F put C in file handling in C. First of all, I am going to implement two header files. Cache include stdir.h and second one is stdeliv.h. So I have included both the header files. Now I am going to define main function. Inside main function, I am going to declare a file pointer that is fp, then a character array str and an integer variable i. Now I am going to call f open function so that I can open a particular file. So name of file is data1.txt and I am going to open it in write mode. Now I am going to apply if condition to check whether this file is opened successfully or not. So if file pointer is containing null, it means file is not opened successfully. Otherwise it will be opened successfully. So if file pointer is equal to null, then I have to print this error message. File cannot be opened and I am calling exit to terminate execution of the program. So if file pointer is containing null, then only exit will be executed. Otherwise remaining instructions will be executed. Now I am going to display a message on output screen. Enter your name and I am going to read name of a person through scanf, %s and str. So name will be stored inside str and then I have to store the name which is available in str string into a file using fpc. So for that purpose I am applying a loop. This loop will repeat till this condition is true that is str of i not equal to null. So if this condition is true, it means str of i is not equal to null then only the particular character will be stored inside a file. Otherwise loop will be terminated. So now I am calling fpc str of i and fp. So str of i is representing a particular character and that character will be stored inside fp. So fpc required two arguments. First one is the character which I want to store in a file and second one is file pointer. So this way a particular character which is available in a string will be stored inside a file. Now I can call f close and I am passing fp and then return 0. So now first I have to check whether this data1.exe is available or not. So you can see I have saved this file .c file in c tc folder bin folder. So I have to check this data1.exe in same path. So I am opening this folder c tc bin and I am pressing D. So the files whose name starts with D are available here and you can see data1.txt is not available here. Now I am going to execute this code and that file will be created automatically because a file opening mode is W and W mode automatically creates a file if it is not present. So it is asking a name. I am entering Sanjay and I am pressing enter. So after completion of this execution file have created in bin folder and this name Sanjay must be stored in that file. So here you can see data1.txt is available. Now I am going to open it by double clicking on it. You can see here Sanjay is available. So this way through a program I have received input from user and I have stored that input into a file permanently with the help of f put c. So this way you can store characters into a file with the help of f put c using file handling in c. I hope you have understood whatever I have demonstrated you in this program. If you want to watch more programming related videos you can search my name Sanjay Gupta. My channel will be available there in YouTube. You can watch various programming related videos there. You can also download my programming app that is TechMS. Thank you for watching this video.