How would I read in exactly 50 characters (49, +1 for null), from a user's input in the console, ignoring only all initial whitespace (as in before the first word) but keeping exactly 49 characters after that, including all whitespace?
Also, if the user were to enter less than 49 characters and enter a newline instead, it would just process that (everything up to the newline ignoring initial whitespace).
I tried to use:
char name[50];
scanf("%49s",name);
However, this seems to ignore all whitespace; so, if my name were to be like: "Mark Smith" it would not process it correctly.