Integer literal in C/C++ (Prefixes and Suffixes)

Integer literal is a type of literal for an integer whose value is directly represented in source code. For example, in the assignment statement x = 1, the string 1 is an integer literal indicating the value 1, while in the statement x = 0x10 the string 0x10 is an integer literal indicating the value 16(in decimal), which is represented by 10 in hexadecimal (indicated by the 0x prefix).
Further, in x = “1” the “1” is a string literal(not a character or an integer literal), because it is in quotes. The value of the string is 1, which happens to be an integer string.

Integer literals are expressed in two types i.e.,

Prefixes which indicates the base. For example, 0x10 indicates the value 16 in hexadecimal having prefix 0x.

Suffixes which indicates the type. For example, 12345678901234LL indicates the value 12345678901234 as an long long integer having suffix LL.

Digit separator: In C++, integer literals may contain digit separators to allow digit grouping into more readable forms. This is particularly useful for bit fields, and makes it easier to see the size of large numbers (such as a million) at a glance by subitizing rather than counting digits. It is also useful for numbers that are typically grouped, such as credit card number or social security numbers.[a] Very long numbers can be further grouped by doubling up separators.
Typically decimal numbers (base-10) are grouped in three digit groups (representing one of 1000 possible values), binary numbers (base-2) in four digit groups (one nibble, representing one of 16 possible values), and hexadecimal numbers (base-16) in two digit groups (each digit is one nibble, so two digits are one byte, representing one of 256 possible values). Numbers from other systems (such as id numbers) are grouped following whatever convention is in use.