scanfをやめてfgetsとstdinで入力を受け付けるのはわかるけど
printfではなくfprintfとstdout(stderr)で出力する理由はなんかあるの?

それとも特別printfを避ける理由はない?