s%是什么意思c语言 瑞丽范 心理 6.53K 大中小设置文字大小 %s在C语言中代表字符串型格式符。%c和%s一般用在printf、sprintf等字符串格式化函数中,用于决定格式化参数的数据类型。如printf("%s", a)会将变量a作为字符串类型进行格式化。</p><p><br /></p><p>%s需要配合printf函数一起使用,如下所示:</p><pre t="code" l="cpp">printf("%s", "adfds") // 输出字符串adfds</pre>。 TAG标签:语言 #