chsalvia
asked on
Asterik character in stream functions
What is the use of the asterik character in stream like functions, e.g. what does the following line of code actually do?
printf(" %-*s ", 50);
I saw this in some source code, but it just prints garbage characters. I can tell the integer parameter refers to the field length it prints, but I can't tell what the "*s" refers to.
printf(" %-*s ", 50);
I saw this in some source code, but it just prints garbage characters. I can tell the integer parameter refers to the field length it prints, but I can't tell what the "*s" refers to.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.