Question: You have written and compiled a program myProg that normally reads input from the keyboard. You have decided that you would like to run it

You have written and compiled a program "myProg" that normally reads input from the keyboard. You have decided that you would like to run it but to have the input supplied from a file "myFile.txt".
Which of the following would work?
.ImyProg myFile.txt
ImyProg AyFFile.txt
ImyProg > myFile.txt
cat myFile.txt >./myProg
cat myFile.txt |./myProg
echo myFile.txt |./myProg
You have written and compiled a program "myProg"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!