Please enable JavaScript.
Coggle requires JavaScript to display documents.
c languages - Coggle Diagram
c languages
data types
char
single byte
with or without sign depending on
machine implementation
qualifiers
signed
unsigned
<qualifiers> <data-type> <variable-name>
int
often 2 bytes
could be also 4 byte (32 bit) natively
natural size of a particular machine
qualifiers
short
at least 2 bytes
long
signed
unsigned
floating point
float
double
long double
one, two or three distinct sizes
qualifiers
unsigned
machine and compiler
type definitions
<limits.h>
<float.h>
constants
numeric
long
using terminal L or l
a number too big to fit
on int
int
a number that fit on int type
octal notation
es. 031
with qualifiers
es. 031U
031L
031UL
exadecimal notation
es. 0X1F
with qualifiers
es. 0X1FU
0X1FL
0X1FUL
unsigned
using terminal U or u
floating point
number with a '.' for decimal part
a number with
exponent notation
es. 1e-2
default assigned data type is double
float
using terminal F or f
long double
using terminal L or l
unsigned
using terminal U or u
char
integer written as one character
es. 'x'
numeric value of the character
machine's character set
es. ASCII
escape sequences
'\' used as prefix
alert (bell) character
'\a'
backspace
'\b'
formfeed
'\f'
newline
'\n'
carriage return
'\r'
horizontal tab
'\t'
vertical tab
'\v'
backslash
'\'
quesion mark
'\?'
single quote
'\''
byte-sized bit pattern
octal number
es. '\032'
hexadecimal number
es. '\x12'
string constant
sequence of zero
or more characters
surrounded by double quote
'\0' at the end
phisical storage require one more int
enumeration constant
list of constant integer values
es. enum boolean {NO, YES};
first value equal to 0, second to 1...
es. enum months {JAN=1, FEB, MAR};
FEB equal to 1, MAR to 2..
bitwise operators
mask operations
bitwise AND
&
used to mask off some set of bits
bitwise inclusive OR
|
used to extract a subset of bits
bitwise exlusive OR
^
check differences
only with integral data types
shift operators
left
x << 2
shift the value of two positions
filling vacated with zeros
equivalent to multiplication by 4
<<
complement operator
unary operator
return the complement bit per bit
~