 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can read multiple numbers from file using 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 bar. My channel will be available there. You can watch various programming related videos here. Now I am going to implement solution of this program. So first I am including a header file that is stdio.h. Now I am including another header file that is stdlib.h. Now I am defining main function. Inside main function, I am declaring a variable n and another variable i. Now I am declaring a file pointer that is fp. This file pointer will be receiving address of the file stored in hard disk. So to open the file, I am calling f open and here I am passing the name number dot txt and I am going to open this file in read mode. Now I have to check whether this file is open successfully or not. So for that purpose, I am writing this if statement. If fp double equals to null, so if this condition is true, it means file is not open successfully. Otherwise, it is open successfully. So if fp equals to null, then I can print the error message file is not present. So this message will be displayed on output screen and I can call exit so that the program can be terminated. If this if condition is false, then I have to write some statements so that I can read data from the file. So for that purpose, I am applying a loop. I am repeating this loop 10 times. So I am imagining that the file is containing only 10 numbers. So for reading 10 numbers, I have repeated this loop 10 times only. Now I am calling fscanf then I am passing fp d and mn as an argument in this fscanf function. So fscanf function reads values from file. Now I have to display those entered number on output screen. So for that purpose, I am writing printf slash n for Cindy and then n. So this statement prints values on output screen. So this way through fscanf, I am going to read values from file and printf will be displaying those values on output screen. Now I am closing the file fp and then I am writing return 0. So now first I have to check whether this number or txt is available or not. So I am pressing, sorry, you have to follow this path first. That is c drive, tc folder and bin folder. So I have already opened the bin folder through c, tc and bin. Now I am typing n. So here you can see number dot txt is available and it is having only one number. So I am entering total 10 numbers here. So now it is having 10 different numbers and I am closing this file. It is asking for saving. So I am saving this file. So again, I am opening this file. You can see it is having 10 different numbers. So now I am going to execute this code and those 10 numbers which are available in the file must be displayed on output screen. So if this program does so then it is correct. Otherwise it is incorrect. So you can see it is showing all 10 numbers which are available in the file as output. So this way you can read the numbers which are available in a file. So I have demonstrated you how you can perform that operation. So fscanf is reading numbers from file and printf is displaying those numbers on output screen. So this way you can read multiple numbers which are available in a file through file handling in C. I hope you have understood how you can read multiple numbers from file. If you want to watch more programming related videos, you can type my name Sanjay Gupta in YouTube search. My channel will be available there. You can watch various programming related videos there. Thank you for watching this video.