This article explains about constants with example in C programming.
Valid Constants
Invalid Constants
123
987612347ul
15 750
-321
987612347UL
20,000
0
+78
$1000
65432L
0xAB
089
545U
0X10A
0xGH
545u
035
12.5
567891
0.0083
0.65e4
-0.75
12e-2
435.36
1.5e+5
+247.0
3.18E3--Underline word is Exponent
-.75
-1.2e-1 --Underline word is Mantissa
.95
Embedded space is not allowed
Constant
Valid
Remarks
698354L
Yes
Long integer
25,000
No
, not allowed
+5.0E3
Unary + allowed
3.5e-5
7.1e4
White space NA
-4.5e-2
1.5E+2.5
Exp must be int
$255
$ not allowed
0X7B
Hexadecimal int
Meaning
'\a'
Audible alert
'\v'
Vertical tab
'\b'
Back space
'\''
Single quote
'\f'
Form feed
'\'"
Double quote
'\n'
New line
'\?'
Question mark
'\r'
Carriage return
'\\'
Back slash
'\t'
Horizontal tab
'\0'
Null