Could some C guru please help me? Suppose I have a code snippet as:
int* doit(){
int intArray[25];
int *ip;
ip = intArray;
return ip;
}
Since the array intArray is allocated on the stack and so destroyed
when function returns, is it safe to say that at compile time it is
not known what ip points to?
Thanks in advance for your help.
int* doit(){
int intArray[25];
int *ip;
ip = intArray;
return ip;
}
Since the array intArray is allocated on the stack and so destroyed
when function returns, is it safe to say that at compile time it is
not known what ip points to?
Thanks in advance for your help.
Comment