+ 1

I don't understand the meaning of this sentence.

Format specifiers begin with a percent sign % and are replaced by corresponding arguments after the format string.

14th Feb 2020, 1:16 PM
æž—ćŠ€ćźž
æž—ćŠ€ćźž - avatar
4 Respostas
+ 3
ć“Ș侀èȘČ的這䞀èȘČć—ŽïŒŸ https://www.sololearn.com/learn/C/2912/ %d æ•Žæ•ž %f ć°æ•ž %c char äŸ‹ćŠ‚ïŒš printf("%d \n", c); format string 指 "%d \n" argument 指 variable c printf("%f \n", salary); format string 指 "%f \n" argument 指 variable salary 朹第äșŒèȘČïŒŒçŹŹäșŒć€‹ code揳例æ–čïŒŒæŒ‰é‚Łć€‹ TRY IT YOURSELFé€Čć…„ code playground, ç„¶ćŸŒRun看output。 - - - Due to Sololearn Q&A forum rules, please use meaningful question name and relevant tags. For this question, the tag should be "c" and "format-specifier". The question shoud be "Format Specifier in C". Please correct your question, thanks.
14th Feb 2020, 1:21 PM
Gordon
Gordon - avatar
+ 3
i.e int num1 = 1; int num2 = 2; printf("%d and %d", num1, num2) ; %d is a format specifier for integers. in the above example first %d will be replaced by num1 second %d will be replaced by num2 output : 1 and 2 if you switch the places of num1 and num2 like : printf("%d and %d", num2, num1) ; output : 2 and 1 there are many format specifiers it's what specifies how a value is treated, as a char or int or float...
14th Feb 2020, 1:26 PM
Bahha┣
Bahha┣ - avatar
0
%d,%s,%f like that are position holder's
15th Feb 2020, 8:33 PM
Prasad Shinde
Prasad Shinde - avatar