prev up next   top/contents search

comp.lang.c FAQ list · Question 7.3c

Q: How much memory does a pointer variable allocate?

A: That's a pretty misleading question. When you declare a pointer variable, as in

	char *p;
you (or, more properly, the compiler) have allocated only enough memory to hold the pointer itself; that is, in this case you have allocated sizeof(char *) bytes of memory. But you have not yet allocated any memory for the pointer to point to. See also questions 7.1 and 7.2.

prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North