Constants
IntegerCharacters 0..9 only
Octal
Prefix 0 (zero) chars 0..7 only
Hexadecimal
Prefix 0x (zero ex) chars a..f A..f 0..9
Explicit Long
Integer/Octal or Hexadecimal types can be declared long by writing L immediately after the constant.
Character
Declared in single quotes e.g. 'x' '\n'
Float
Characters 0..0 and one "." May also use scientific notation exponents with e or E preceding them. e.g. 2.14E12 3.2e-2
Strings
String constants are written in double quotes e.g. "This is a string" and have type pointer to character.
0 comments:
Post a Comment