C language study notes (4)
Others
2020-03-29 23:08:49
views: null
My handwritten notes
MOOC Code
my question
- % D% i and the difference between:
- Solution: When using the printf format string, there is no difference. When used in a scanf format string, there are differences: in scanf format,% d matches only decimal integer; and% i can match octal, decimal, hexadecimal, integer representation. For example: If the number entered is the prefix 0 (018,025),% i will take it as an octal number to deal with, if there is a prefix 0x (0x54), it will be handled in hexadecimal.
PTA issues
- Structure type and structure variables are occupied memory?
- Resolution: The structure type is defined simply tell the compiler how to represent data, but it does not let the computer assigned space. Definition of a structure is generally not allocated memory is declaring a structure variable memory allocation.
Origin www.cnblogs.com/ABClazyboy/p/12595068.html