F
fctk
some other doubts:
1) K&R, p50, 2.10:
"if expr1 and expr2 are expressions, then
expr1 op= expr2
is equivalent to
expr1 = (expr1) op (expr2)
except that expr1 is computed only once."
what does "except that expr1 is computed only once" mean? can you make
any example in which this propriety is important?
2) is it true that the value of a character constant such as 'C' depends
on the system character set (ASCII, EBCDIC, ...)? so if i write
something as 'C' - 20, will my program become not portable?
3) is it true that a char *must* be 1 byte? here instead
http://www-ccs.ucsd.edu/c/types.html#Basic Integer Types is written
that the requisite is that the *minimum* range for unsigned char, for
example, must be from 0 to 255, so it may be 2 bytes or 200 bytes
without any problem.
4) i have some problems at distinguish declaration from definitions.
for example:
double function(double x, double y); /* prototype (a kind of function
declaration) */
double function(double x, double y) { /* function definition */
int a; /* definition? declaration? */
}
also, are 'double x, double y' in the function definition two
definitions or two declarations?
thanks.
1) K&R, p50, 2.10:
"if expr1 and expr2 are expressions, then
expr1 op= expr2
is equivalent to
expr1 = (expr1) op (expr2)
except that expr1 is computed only once."
what does "except that expr1 is computed only once" mean? can you make
any example in which this propriety is important?
2) is it true that the value of a character constant such as 'C' depends
on the system character set (ASCII, EBCDIC, ...)? so if i write
something as 'C' - 20, will my program become not portable?
3) is it true that a char *must* be 1 byte? here instead
http://www-ccs.ucsd.edu/c/types.html#Basic Integer Types is written
that the requisite is that the *minimum* range for unsigned char, for
example, must be from 0 to 255, so it may be 2 bytes or 200 bytes
without any problem.
4) i have some problems at distinguish declaration from definitions.
for example:
double function(double x, double y); /* prototype (a kind of function
declaration) */
double function(double x, double y) { /* function definition */
int a; /* definition? declaration? */
}
also, are 'double x, double y' in the function definition two
definitions or two declarations?
thanks.