Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the difference between 1d and ld in C language? D and Ld.
What is the difference between 1d and ld in C language? D and Ld.
In C, 1d is nothing, and ld is a legal user identifier!

% 1d- In scanf, decimal receives an integer of one bit. In printf, the corresponding variable value is output in decimal, and 1 bit is aligned to the right. When the actual number of bits is greater than 1, it is output according to the actual number of bits.

% ld-In scanf, decimal integer data is received as a long integer, that is, a number occupies 4 bytes; In printf, long integer data (4 bytes) is output. In a 32-bit system, it has the same effect as% d.