How to provide input f text file

after compilation how to provide input.txt file for taking input

hello @coder_girl
have u done the setup of ur editor?

I’m using vs Code
And using code runner

Here is screen shot after compilation screen :

put input.txt and output.txt in same folder.
then add these these lines in ur code
image
and then try

I’m taking about linked list video .
In video fopen or fclosed not used
simply giving input.txt file before running the code
video Link:
https://online.codingblocks.com/app/player/141494/content/151882/566/lecture
**

at 4:46

**

i dont have access to the link .

see it is not a part of logic . we are adding this becuase we want to read and write in file.
if u want to give input in console and want to take ouput on console then there is no need of these lines (but for files it is required)

for ur info->
fopen is for reading input from input.txt file
and fclosed is for writing output in output.txt file.

try once and see it is working or not.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.