c-program questiontype: echoing stdin to stdout

Re: c-program questiontype: echoing stdin to stdout

por Richard Lobb -
Número de respuestas: 0
Hi Michael

Thanks for posting. That approach looks fine, provided students don't attempt to use unimplemented features. I no longer teach C myself but I'll pass it on to a guy in our department who does.

I vaguely recall another user solving the same problem using OS-level operations - perhaps a pseudo-terminal? - but I don't remember the details. For a simple introductory course with students reading only a single integer or a single string, your approach is probably simpler.

Thanks

Richard