> Constant in c ~ Online tutorial

Constant in c

Constants

Integer
Characters 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.

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: