Professional Documents
Culture Documents
DATA TYPES
Programming Languages for bioinformatics
BIF507
CHARACTER SET
The words can be used to form words, numbers
and expressions.
Uppercase Letters A to Z
Digits 0-9
} Right brace
$ Dollar sign
[ Left bracket
% Percent sign
] Right bracket
^ Caret : Colon
Quotation mark
& Ampersand
; Semicolon
* Asterisk
< Opening angle bracket
( Left parenthesis
> Closing angle bracket
) Right parenthesis
? Question mark
_ Underscore
, Comma
C TOKENS
Operators
Keywords
Special Symbols
Identifiers
Constant Strings
KEYWORDS AND IDENTIFIERS
Every C word is classified into either keywords or
identifiers
String
Integer Real Single character Constants
Constants Constants Constants
Integer constant
Can decimal integer or octal integer or hexadecimal
integer
Decimal integer (0-9, preceded by + or - , eg +98 , 653487)
Octal integer (0-7, leading to 0, eg 034, 0456, 0)
Hecadecimal (preceded by 0x/0X, include A-F/a-f, eg. 0x2,
0xF9)
Real constant
Numbers containing fractional parts
Called real or floating points
Can also be represented in exponential notation
215. , .95 , +.6, 0.65e4
Single character constant
Under single qoutes
e.g 5, K, ; ,
Character constant has an integer values (ASCII)
String constant
Under double qoutes
Hello Worlds , 1987
Case sensitive
DATA TYPES
Three types
Primary
Derived
User Defined
Type Description
char Typically a single octet(one byte). This is
an integer type.
int The most natural size of integer for the
machine.
float A single-precision floating point value.
double A double-precision floating point value.
void Represents the absence of type.
Type Storage size Value range
char 1 byte -128 to 127 or 0 to 255
Control string
%d, %f, %c, %s
END