Answer the question
In order to leave comments, you need to log in
How to redirect input from a file (variable) to scanf (bash)?
Good afternoon. I am writing a simple C program and it needs to be tested on various values. The program makes an input request through scanf, and you need to redirect the data from the file to it. I can read the lines, but I don’t understand how to redirect input (for example) from a variable.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question