I need to take input from a file and store some values. Then I want to receive some queries from the user. So if I use freopen()
to read from a file, then how can I switch back to keyboard or terminal input?
I used freopen("input.txt", "r", stdin);