Can you specify variable field width in a scanf format string If possible how?
The only drawback to this method, other than requiring two statements, is that the compiler can’t do a sanity check on the arguments to scanf like it can when the format is a string constant.