How to make scanf(), cin or input files work?

If I want to input some parameters or files from the host device, e.g scanf(),
how to make it work when debugging?