Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок+ 1
What is the meaning of %s in c?
3 ответов
+ 4
It's a format specifier that is used for strings.
+ 1
And also you can use it for characters in place of '%c'...
+ 1
Arin Bagul
%s tells printf that the corresponding argument is to be treated as a string (in C terms, a 0-terminated sequence of char ); the type of the corresponding argument must be char * . %d tells printf that the corresponding argument is to be treated as an integer value; the type of the corresponding argument must be int
https://stackoverflow.com/questions/9026980/what-does-s-and-d-mean-in-printf-in-the-c-language#:~:text=%25s%20tells%20printf%20that%20the,corresponding%20argument%20must%20be%20int%20.