Afficher un message
Vieux 18/10/2007, 11h29   #2
christian.bau
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: The sizeof operator : sizeof(++i)

Kislay wrote:
> int main()
> {
> int i=10;
> printf("\n Size of i = %d ",sizeof(++i));
> printf("\n i = %d ",i);
> system("pause");
> return 0;
> }
>
> 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 doesn't evaluate its operand.

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