One of the things I find hard to understand is "stack space".  I have read
cautions to avoid loading up the stack because of it's relatively limited
supply.  Below are several declarations.  Can someone explain which ones use
up stack space, and if there is a rule of thumb I should follow in
determining which declarations do so.  My understanding is that anything
that is declared as a pointer (ex. s2) would get stored at the high end of
the dynamic heap, and not in the stack.  Please help me out, I'd really
appreciate it.

Mitch 

char s1[]= "Hello";   // array of characters
CharPtr  s2;      // pointer to a string
char s3[20];    // array of 20 caharacters
CharPtr s4[10];    // array of 10 pointers
int i;    // integer
int j[10];    // array of 10 integers

s2 = "Goodbye";
i = 15;

Reply via email to