%d is used to output integers.
Because format characters represent the contents of several bytes from the specified starting address (interpreted as long integers or integers), if the wrong object is used, you will get unexpected results. If you use %d to output a long integer, just take its first few bytes, which is equivalent to taking the modulus of the original long integer; However, if %ld is used to output integers, and the actual number is very small, and multiple bytes are forced to be taken, there will be cases where data such as "other people's children are taken home" are interpreted as current values.