Question: Write a function scanstring that works basically like scanf with a %s placeholderthat is, it skips leading whitespace and then copies a string up to
Write a function scanstring that works basically like scanf with a %s placeholderthat is, it skips leading whitespace and then copies a string up to the next whitespace characterexcept that it uses getchar and takes an extra argument stating the amount of space available in the first argument. Unlike scanf, function scanstring should prevent overflow of its string argument.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
