user-0 提问: 大神帮忙看看，获取字母数与名字尾对其，为什么使用strlen(fname)和strlen(name)两次

回复:
user: user-1
content: printf("%*d", i, number); 在这里：%*d告诉printf函数将要使用是一个可变的字段宽度， 该字段宽度由第一个参数指定，即用i代替*。

user: user-2
content: man 3 printf       |     |     \/  The  arguments must correspond properly (after type promotion) with the        conversion specifier.  By default, the arguments are used in the  order        given,  where  each '*' and each conversion specifier asks for the next        argument (and it is an  error  if  insufficiently  many  arguments  are        given).   One  can  also specify explicitly which argument is taken, at        each place where an argument is required, by writing "%m$"  instead  of        '%'  and  "*m$" instead of '*', where the decimal integer m denotes the        position in the argument list of the desired argument, indexed starting        from 1.  Thus,             printf("%*d", width, num);         and             printf("%2$*1$d", width, num);         are  equivalent.   The  second  style allows repeated references to the        same argument.  The C99 standard does not include the style using  '$',        which comes from the Single UNIX Specification.  If the style using '$'        is used, it must be used throughout for all conversions taking an argu‐        ment  and  all  width and precision arguments, but it may be mixed with        "%%" formats which do not consume an argument.  There may be no gaps in        the numbers of arguments specified using '$'; for example, if arguments        1 and 3 are specified, argument 2 must also be specified  somewhere  in        the format string.

user: user-3
content: 作为一个C程序员，对  scanf,sscanf,fscanf  printf,sprintf,fprintf 这类函数的用法，还是要做到“拳不离手，曲不离口”的。

user: user-3
content: printf Width Specification The second optional field of the format specification is the width specification. The width argument is a nonnegative decimal integer controlling the minimum number of characters printed. If the number of characters in the output value is less than the specified width, blanks are added to the left or the right of the values — depending on whether the – flag (for left alignment) is specified — until the minimum width is reached. If width is prefixed with 0, zeros are added until the minimum width is reached (not useful for left-aligned numbers).  The width specification never causes a value to be truncated. If the number of characters in the output value is greater than the specified width, or if width is not given, all characters of the value are printed (subject to the precision specification).  If the width specification is an asterisk (*), an int argument from the argument list supplies the value. The width argument must precede the value being formatted in the argument list. A nonexistent or small field width does not cause the truncation of a field; if the result of a conversion is wider than the field width, the field expands to contain the conversion result.

user: user-4
content: %-*d告诉printf函数将要使用是一个可变的字段宽度，后面需要根两个参数，第一个是宽度，第二个是你的数值

user: user-5
content: 后面要和前面保持一致，*代表数据的宽度，一般小于或者等于％d的长度，后面的是％d的数据联系，*是一个printf的修饰符。

user: user-6
content: printf("%*d", 10, 1) 这句话意思是输出最少10位，前面不足的用空格补  相当于长度为10，右对齐 这样理解了吧。。。

user: user-7
content: 题目么有看懂？？？？

user: user-6
content: "获取字母数与名字尾对齐”  这句话不理解啊。。。