ya all the exprn is evaluated and left expr is assigned ..

On Dec 13, 9:21 pm, siva viknesh <[email protected]> wrote:
> #include<stdio.h>
> int main()
> {
>  int a=1,b=2,c=3;
>
>  c=--a,b++ - c;
>
>  printf("%d %d %d",a,b,c);
>  return 0;
>
>  }
>
> the above code is perfectly valid and prints "0 3 0" ...
>
> but how "comma" is evaluated and the value assigned to variable 'c' is the
> expression evaluated on the RHS of comma....is there any such rules in C ??

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to