Link to home
Start Free TrialLog in
Avatar of chsalvia
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.


ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial