I was reading a book and came across a program to read entries from a /proc file.
The program which they mentioned has following line
printf("%.*s", (int) n, line);
I am not clear with meaning of above line
- what type of print if above
"%.*sused instead of%s
The code can be read here
Abstract from here:
So this prints up to n characters from line string.