<p>I got a program with a fscanf like this:</p>

<p>fscanf(stdin, "%d %d,....</p>

<p>I got many fscanf and files that I'd like to test, the files are like this</p>

<p>10485770 15 51200000
 -2 10 
10 10485760 10485760
10 10485760 10485760
10 10485760 10485760</p>

<p>Well my question is how can I tell to the program or the compiler to take the inputs not from the keyboard, but from those files. These programs are benchmarks and in the files I got the inputs, I'm sure there is a way to do this automatic because in some case there are many inputs. Thank you in advance.</p>

Try freopen. Eg.
```
```
freopen( "somefile.txt", "r", stdin );
```
```