what is meant %d | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is meant %d

30th May 2019, 10:43 AM
MURALI.K.V.R
MURALI.K.V.R - avatar
3 Answers
+ 3
Hi Mass Murali , šŸŽ %d, is an format specifier which is used to specify integer number %dĀ is used to represent a part of memory as an integer.Ā same is %f and other speciers is work for float and so on šŸŽ If we want to read and print integer using scanf() and printf() function, either %i or %dĀ is used but there is subtledifferenceĀ in both %i and %dĀ format specifier. %dĀ specifies signed decimal integer while %i specifies integer Have these šŸŽ šŸŽ šŸŽ šŸŽ
30th May 2019, 10:48 AM
DishaAhuja
DishaAhuja - avatar
+ 4
If we are talking about python this expression can have different meaning. ā€˜%dā€™ is used as a plaeholder in formatting output with print and is used to display ā€œsigned intā€ values. In formatting date / time with strftime() ā€˜%dā€™ does display the number of day in a month from a datetime object.
30th May 2019, 10:59 AM
Lothar
Lothar - avatar
0
thanks
30th May 2019, 11:01 AM
MURALI.K.V.R
MURALI.K.V.R - avatar