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>
Not really an "answer" but it should be noted that the main use of the comma operator is to sequentially evaluate expressions with side effects such as function calls, assignments, etc. in contexts where multiple statements would not be valid. The most essential use is in macros where you want the entire macro to "return a value" but perform more than one operation. The only other ways to accomplish this are using the gcc `({ /* multiple statements here */ })` extension or having the macro simply call a `static`/`static inline` function.

Another frequent use I find for the comma operator is with the `for` statement:

```
for (n=cnt; n; n--, d++, s++)

```

and when I have an `if` statement that needs to do two closely-connected operations and I don't want the visual clutter of braces:

```
if (condition) prefix="0x", len=2;

```

In these latter uses, the value of the result of the comma operator is not particularly useful, so it doesn't matter so much that it may be confusing to C beginners.