Q1, Is [a-z], [^x], ... these simple regular expressions in the stardard of C? I mean, OK in most implements?
scanf looks strange to me. What will scanf actually do in the while loop?
Q2, How does it do to the final character before blank? What do I get from the stdin in the next time?