Discussion: sizeof(ptr) = ?
Afficher un message
Vieux 22/10/2007, 09h34   #3
Road Tang
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sizeof(ptr) = ?

William Xu wrote:

> I test it with char, short, int, long, float, double and struct
> pointers, all return 4 bytes. Does the standard say anything about
> sizeof a pointer? (I didn't find it in the standard...)
>


it's implementation defined.
e.g

on 32-bit machine, sizeof(ptr) may be 32
and 64-bit machine it returns 64.

Road
--
C FAQ: http://c-faq.com/
  Réponse avec citation
 
Page generated in 0,05232 seconds with 9 queries