S4 2 Basicdatatypes
S4 2 Basicdatatypes
C-Part-2
• Character zero ( ‘0’ ) is not the same as the number (integer constant)
0.
• There are other escape sequences like, \t for tab, \v for vertical tab, \n
for new line etc.
letter = ‘A'; /* OK */
letter = A; /* NO! Compiler thinks A is a variable */
letter = “A"; /* NO! Compiler thinks “A" is a string */
letter = 65; /* ok because characters are internally stored
as numeric values (ASCII code) */
The value before the letter e is known as the mantissa, whereas the
value that follows e is called the exponent.
There are three floating-point type specifiers
float
double
4/9/2021
long double CSE 1051 Department of CSE 7
SIZE AND RANGE OF VALUES FOR 16-BIT MACHINE
(FLOATING POINT TYPE)
Type Size
32 bits
Single Precision Float
4 bytes
64 bits
Double Precision double 8 bytes