saravanan kumar wrote:
> hi friends,
>  
> hw assignment operator is executing?
>  
> for example,
>  
> int i=1,j,k;
>  
> i++ + (j=i);
>  
> nw the j value is 2; // i is incremented and assgined., eventhough it is post 
> incr
>  
> k = i++ + (j=i);
>  
> nw the j value is 1. // wht happned here??
>  
> please explain the sequence point for assignment operator., like where it can 
> be change the memory value.,

Don't do that.  Looks like undefined behavior to me.  Separate the above 
into multiple statements to declare your intentions.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to