G+: You learn something new every day:printf("%.*s\n", 5, "Hello, …

David Coles
You learn something new every day:

printf("%.*s\n", 5, "Hello, world!");

(+1's) 1
Jeremy Visser
Wow, funky.

$ ./a.out
Hello

David Coles
Funky syntax though - initially I thought it was some sort of GNU regex extension. The scanf function also uses a '*' flag if you want to ignore a particular field. Apparently both features were snuck into C99.