Beruflich Dokumente
Kultur Dokumente
Bits
char
unsigned char
signed char
int
16
unsigned int
16
signed int
16
short int
unsigned short int
signed short int
long int
long long int
signed long int
unsigned long int
unsignwd long long int
float
double
long double
8
8
8
or 32
or 32
or 32
16
16
16
32
64
32
32
64
32
64
80
RANGE
127 to 127
0 to 255
127 to 127
32,767 to 32,767
0 to 65,535
Same as int
32,767 to 32,767
0 to 65,535
Same as short int
2,147,483,647 to 2,147,483,647
(263 1) to 263 1 (Added by C99)
Same as long int
0 to 4,294,967,295
264 1 (Added by C99)
1E 37 to 1E+37 with six digits of precision
1E 37 to 1E+37 with ten digits of precision
1E 37 to 1E+37 with ten digits of precision
||
?:
= +=
,
= *= /= etc.
Lowest
31) Type conversion - The compiler converts all operands up to the type of the l
argest operand, which is called type promotion
32)There is one additional special case: If one operand is long and the other is
unsigned int, and if the
value of the unsigned int cannot be represented by a long, both operands are
converted to unsigned long
33)True - value other than zero (including negative value) and False - zero valu
e
34)Difference btw switch and if
switch - switch can only test for equality
- int type only evaluated
- No two case constants in the same switch can have identical val
ues
35) Cant pass array as argument to the function ,how ever pass a pointer to an a
rray by specifying the array's name without an index
36) char *a ,char a[10] ,char a[] all these are valid to recieve pointer to the
array (function formal parameters)
37) char arr[2][5];
arr[1] is equal to &arr[1][0]
38)p[5] = 100; /* assign using index */
*(p+5) = 100; /* assign using pointer arithmetic */
39)a[j][k] is equivalent to *((base type *)a+(j*row length)+k)
40)The cast of the pointer to the array into a pointer of its base type is neces
sary in order for the pointer
arithmetic to operate properly. Pointers are sometimes used to access arrays bec
ause pointer arithmetic is often faster than array indexing
41)Array of pointers can be used to hold strings
char *str[]=
{
"Printing",
"Error Occured",
"Completed"
};
42)char *p = "hello world";
perfectly valid , this string will be stored in the string table and can be
accessable through out the program