Array of char pointers.
- From: goodTweetieBird <goodTweetieBird@xxxxxxxxxxx>
- Date: Sun, 13 Apr 2008 09:25:11 -0700 (PDT)
If I had to say what "arr" is, I would say it is an array of pointers
to chars. If so why is it intialized with strings instead of
addresses?
char *arr[] =
{
"a", "b", "c","dd", "eee"
};
Also when looking at the values of the pointers (when they appear to
be adjacent) they seem to decrease by at least 8 bytes ( two native
size words?) even when the strings are a single character, which
should be two bytes. So I am guessing they are on a stack if the
addresses decrease but why 8 bytes each? Is it some type of linked
list? I suppose it doesn't really matter but it is a curiosity and I
am interested in how the language works.
Thanks,
gtb
.
- Follow-Ups:
- Re: Array of char pointers.
- From: Barry Schwarz
- Re: Array of char pointers.
- From: Alex Blekhman
- Re: Array of char pointers.
- Prev by Date: Re: #pragma comment lib
- Next by Date: Re: Array of char pointers.
- Previous by thread: CString bug?
- Next by thread: Re: Array of char pointers.
- Index(es):
Relevant Pages
|