How would I go about reading a string from stdin and formatting as such to stdout?
For example: If I receive someone's name: John Doe 03 17
I want to create user name for him as such: jd0317
Although it can change to for someone with a middle name: Jane B. Doe 05 18
Then it would be: jbd0518
I assume you would read the line and then when you reach a space, you would store that part of the name in an array and chop off the rest of it which you won't need. I would keep reading until CTRL^D was read from stdin which would represent the EOF.
Would I just use scanf in a loop or getchar?