Difference between start-pointers and interior-pointers and in what situation we should prefer one over other?
Difference between start-pointers and interior-pointers and in what situation we should prefer one over
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As a complete guess, a “start-pointer” is a pointer returned by
mallocornew[], whereas an “interior-pointer” is a pointer to the middle of the allocation.If so, then the important difference is that you need to
freethe start-pointer, not an interior-pointer.This isn’t terminology from the standard, though. “Interior pointer” usually means a pointer into some larger block of memory and I guess/deduce the rest. So, you probably need to provide the context. What book/course/interview is the question from?