Re: sizeof(ptr) = ?
Richard wrote:
It returns a `void*`.
(If that's not enough of an answer, you'll have to unpack your question.)
--
Chris "`essen`, vb, 'to buy many games'" Dollin
Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England
Richard wrote:
Barry Schwarz <schwarz45@yaho o.comwrites:
>>
>While this may be true in your experience, the C standard imposes no
>such restriction. Furthermore, there are systems for which it is not
>true.
>
Could you explain how malloc works for such systems please.
>>Pointers of any type will have the same size because they hold the address
>>value of memory that they point to, thus they always hold the same type of
>>data. On standard PC's this is a 32bit address (4 bytes), but it depends on
>>the system what the size is.
>>value of memory that they point to, thus they always hold the same type of
>>data. On standard PC's this is a 32bit address (4 bytes), but it depends on
>>the system what the size is.
>While this may be true in your experience, the C standard imposes no
>such restriction. Furthermore, there are systems for which it is not
>true.
Could you explain how malloc works for such systems please.
(If that's not enough of an answer, you'll have to unpack your question.)
--
Chris "`essen`, vb, 'to buy many games'" Dollin
Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England
Comment