Afficher un message
Vieux 18/10/2007, 11h32   #3
vipvipvipvip.ru@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: The sizeof operator : sizeof(++i)

On Oct 18, 1:22 pm, Kislay <kislaychan...@gmail.com> wrote:
> On executing the above code , the value of i obtained as 10 . What
> happens to the increment ? Why does not not that take place ? Has it
> got something to do with the fact that sizeof is a compile-time
> operator ?


sizeof does not evaluate what it's given, that's why sizeof *p works
with uninitialized pointers, for example.
sizeof is not preprocessed, but evaluated/replaced by the compiler.

  Réponse avec citation
 
Page generated in 0,04378 seconds with 9 queries