Question: The following code segment get an output of 32, I am kind of confusing why?

```
 int i=(j=4,k=8,l=16,m=32); printf(“%d”, i); 

```

Answer: 
Start reading inside the first set of parentheses.

The comma operator evaluates each of several expressions subsequently. It returns the return value of the last expression - in this case, it is 32, because the return value of an assignment is the value assigned.

<http://en.wikipedia.org/wiki/Comma_operator>
```
int i=(j=4,k=8,l=16,m=32); printf(“%d”, i); // Will give you 32
int i=(j=4,k=8,l=16); printf(“%d”, i); // Will give you 16
int i=(j=4,k=8,l=16,m=32,n=64); printf(“%d”, i); // Will give you 64

```

See the pattern?

Basically, `i` is being set to whatever the value of the last assignment in the braces is, since the `,` operator will evaluate each assignment in sequence but return the value of the last assignment made in your case above.

More generally, the `,` operator ([comma operator](http://en.wikipedia.org/wiki/Comma_operator)) will evaluate a series of expressions in sequence and return the value of the last expression. So in your case, `i` is being assigned the value being assigned last in braces (since the return from an assignment, is the value being assigned), which is 32.