+ 3

What is %ld

What is %ld

4th Apr 2021, 5:31 AM
Surya L
Surya L - avatar
3 Antworten
+ 6
That's a format for long decimal. It is used in c and other languages for printing "long" data types. This question and answer is related: https://stackoverflow.com/questions/38561/what-is-the-argument-for-printf-that-formats-a-long
4th Apr 2021, 5:36 AM
Josh Greig
Josh Greig - avatar
+ 1
Ok thx
4th Apr 2021, 5:37 AM
Surya L
Surya L - avatar
+ 1
Hey Surya Raj The intent is that short and long should provide different lengths of integers where practical; int will normally be the natural size for a particular machine. short is often 16 bits long, and int either 16 or 32 bits. longs are at least 32 bits, and short is no longer than int, which is no longer than long.
4th Apr 2021, 5:50 AM
Giriraj Yalpalwar
Giriraj Yalpalwar - avatar