Basic C Data types
Standard types similar to those in Java
- int, long (integers)
- float, double (floating point)
- char (characters, normally ASCII)
No type boolean
- 0 represents false (like Matlab)
- non-0 represents true
- relations (<. <=, ==, !=, >= >) and logical operations (!, &&, ||) yield 0 of false, 1 if true
Size of arithmetic types depends on machine/compiler. Examples:
- int: usually 16 or 32 bits
- long: at least as many bits as int, usually 32, sometimes 64.
Need to be careful if you want portable code.