You use %d in printf, which means printing data in signed decimal form.
Signed int (compiler allows abbreviation int) is a signed integer of at least 2 bytes. Now the operating system is basically set to 4 bytes, and the value range of 4-byte int is -2 147483647 to 2 147483647.
For unsigned int, it is still 4 bytes, but its value range is 0 to 4294967295.
For signed int, he expressed unsigned int from 0 to 2 147483647 as 0 to 2 147483647, and 2 147483648 to 4294967295 as -2 147483647 to-.
So, the-100 in the first paragraph I just said didn't want to be 100, but it became an unsigned integer corresponding to-100, which was stored in A, and then you output A with %d, because %d, it changed from this unsigned integer to-1.
For unsigned int output, %u output should be used. You can keep asking me questions.