1, different data types:
The number 1 is an integer type (int) in the numerical type
The numeric character '1' is a character type (char)
2. The processing methods are different:
The number 1 is processed according to the processing method of numerical information.
The numeric character '1' is processed as a string.
3, the expression is different:
The placeholder for the number 1 is %d.
The placeholder for the numeric character '1' is %c.
Extended information:
A string or String is a string of characters composed of numbers, letters, and underscores. Generally recorded as s=“a1a2···an” (n>=0). It is a data type that represents text in programming languages.
In programming, a string is a continuous sequence of symbols or values, such as a symbol string (a string of characters) or a binary digit string (a string of binary digits).
Usually the entire string is used as the operation object, such as: finding a substring in the string, obtaining a substring, inserting a substring at a certain position in the string, deleting a substring, etc.
The necessary and sufficient conditions for two strings to be equal are: the lengths are equal, and the characters at each corresponding position are equal. Assume that p and q are two strings. The operation of finding the position where q first appears in p is called pattern matching. The two most basic storage methods of strings are sequential storage and linked storage.
The string data type allocates one byte for each character, and although the precise character set varies from region to region, the character encoding is similar enough that programmers can ignore it - the same system in different regions The character set group used either has a character in the same position or does not have it at all. These character sets are typically based on ASCII or EBCDIC.
Baidu Encyclopedia-String