Hello everyone, my name is Atharva and we are continuing this C programming course.
Here in this video, we will discuss more input and output functions.
We will quickly start and see our first function, which helps us in input and output.
This function’s name is ‘remove function.’
Remove function work exactly like its name.
This means that whenever we are using any file in our program, now we have got files of different types, like some of the files have an extension dot TXT or dot DOC or any such file that we are using in our program.
Now, how do we use it and how is it opened? All these things we will be discussing in the coming videos.
But for now, we will keep in mind that whenever we are using a certain file in our program and we want that the file that we have made or which is already made, we want that we should delete this file.
But delete not in a way that we right clicked it and we clicked on delete button.
We will not want to delete it in that way.
We want that through the program itself we should delete the file, which means whenever our program is running, at that time we should delete our file, in this way we wish to create a scenario and to create that scenario what helps is the remove function.
Remove function is used to delete any given file and whichever file is that, its name we will write in this bracket through which we get to know that this is the file which I have to delete and then it goes and deletes that file.
So, here this remove function basically works in deleting any file.
Now, we will move ahead and quickly see one more such function which is extremely important over here.
This function is called the F flush function.
Now when we are performing input and output operations, you will see that whenever we do the interactions through the terminal,
Which means we take the input from there or we give the output.
We use STD IN or STD OUT, which means the standard input or the standard output, we are using these pointers.
What do these do? This basically helps us to make such a temporary location, which we call as a buffer place or to make a buffer location which is temporary and any input that we are taking from there or we are giving the output, that is first stored in a temporary location and after that, it is brought up and given to us.
So, this temporary location or this buffer location, this buffer zone, to this buffer zone if we say, we have to delete it, we have to clean it.
So that we can make use of it again.
So, to handle that situation, we use our F flush function.
So, what we did is, we performed one input operation, then what happened was the buffer location that was created, that thing came and got stored in it.
Now we want to perform one more input operation.
But in that buffer location, there is already something because of which, our compiler is not able to accept that other input.
So, what will we do then? We will make use of the F flush function on our buffer location, whichever value was stored.
We will remove it or clear it and then whatever new value that was to come, it will come and get stored over there.
So, this is the work of our F flush function, which cleans our buffer location, which can be input or output.
It clears it and there we can again get some new value and place it.
So here in this video we saw remove function as well as F flush function.
Remove function helps us in deleting any file from the program.
Along with that F flush function, helps us clean the value stored at any buffer location.
If you have any queries or comments, click the discussion button below the video and post there. This way, you will be able to connect to fellow learners and discuss the course. Also, Our Team will try to solve your query.
After this, in the next video we would be discussing input and output operations in the file.
How the files that we were talking about right now.
How we can perform input and outputs on the files.
Which means how the exchange of data can be done in it.
We will be seeing this in the next video.
And in the next module we will see, even the pre-processors, which means after handling the files and after performing the input and output operations, we will see our next module in which, we will see the pre-processors.
How will they be and what will they be, all these things, we will be seeing in the next video.
Till that time, you keep on practising these input and output functions.
We will meet you in the next video.
Share a personalized message with your friends.