最佳答案
How can I print a non-null-terminated string using printf, assuming that I know the length of the string at runtime?