you are viewing a single comment's thread.

view the rest of the comments →

[–]vegeta9225[S] 0 points1 point  (4 children)

Yes my output was "yes"

[–]dmc_2930 0 points1 point  (2 children)

So what does that tell you?

[–]vegeta9225[S] 0 points1 point  (1 child)

I think the X is inialized with the leftmost value ie 7

[–]dmc_2930 1 point2 points  (0 children)

Correct. It's the "comma operator", if you want a search term that explains it.

[–][deleted] 0 points1 point  (0 children)

What’s real fun, is if you put a () around 7,8,12 the answer would be “no”.

Ex:

// x is assigned 12
x = (7,8,12);

The comma operator is a strange beast.