控制打印字符串长度--c

参考:printf(”%*.*s“) 动态控制宽度的方法_printf控制宽度_w332530494的博客-CSDN博客

C语言%s格式符的使用! - 简书

https://www.cnblogs.com/ai616818/archive/2012/05/31/2528472.html#:~:text=%E5%8E%9F%E6%A0%B7%E8%BE%93%E5%87%BA%E5%AD%97%E7%AC%A6%E4%B8%B2%3A%20printf%28%22%25s%22%2C%20str%29%3B%202.%20%E8%BE%93%E5%87%BA%E6%8C%87%E5%AE%9A%E9%95%BF%E5%BA%A6%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%2C,%E8%B6%85%E9%95%BF%E6%97%B6%E4%B8%8D%E6%88%AA%E6%96%AD%2C%20%E4%B8%8D%E8%B6%B3%E6%97%B6%E5%8F%B3%E5%AF%B9%E9%BD%90%3A%20printf%28%22%25Ns%22%2C%20str%29%3B%20--N%20%E4%B8%BA%E6%8C%87%E5%AE%9A%E9%95%BF%E5%BA%A6%E7%9A%8410%E8%BF%9B%E5%88%B6%E6%95%B0%E5%80%BC

你可能感兴趣的:(c编程练习,c语言,开发语言)