Why does the multiplication program written in C language show the wrong result?
The mistake is obvious. Long integers should not be used for output. Reason: Long integer is 4 bytes, integer is 2 bytes, and the value you entered is 147 * 369.
And why printf ("Wang Pan is %d\n", Wang Pan); Is it negative? Because %d is a signed integer, its highest bit is caused by the sign bit.
Modification method: changed to printf ("Wang Pan is %u\n", Wang Pan); Do it.