Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Enrico Bini
University of Turin
double a;
a = 10.0;
a = .3;
a = 84753933.;
a = 918.7032E-4;
a = 4e+12;
a = 3.5920E12;
...
p_b = p_a;
*p_a = 1;
*p_b = 2;
printf("%i\n", *p_a); // what is the printed value?
Warning: * is used to both declare a pointer and to dereference it
v = 2;
p = &v;
printf("%i\n", *p);
p = &v;
however, it is not possible to dereference it by *p. The compiler
doesnt know how to interpret the byte at the memory location
pointed by p.
p = NULL;
all bits of the variable p are zero.
a NULL pointers cannot be dereferenced: it does not point to any
useful memory location
WARNING
I void * is a type of pointers
I NULL is a possible value of a pointer
test-array.c
test-float.c