P
Peter Ammon
Does anyone ever write the arguments to printf()-like functions under
the corresponding format specifier?
printf("My name is %s and I am %u years old\n",
name, age);
If the arguments are too long, you could put them on the next line
printf("You got %u/%u (%.2f %%) right\n",
numRight,
numTotal,
(100.*numRight)/numTotal);
The intent is to make it easier to match an argument with the
corresponding format specifier. What do you think?
-Peter
the corresponding format specifier?
printf("My name is %s and I am %u years old\n",
name, age);
If the arguments are too long, you could put them on the next line
printf("You got %u/%u (%.2f %%) right\n",
numRight,
numTotal,
(100.*numRight)/numTotal);
The intent is to make it easier to match an argument with the
corresponding format specifier. What do you think?
-Peter