Expression1, Expression2, Expression3, ....so on
In the above syntax, multiple expressions are separated using a comma operator. During execution, each expression will be executed from left to right and the rightmost expression will be returned.
In the output, first of all the function x() is executed then y() and lastly z(). Finally, comma operator returns rightmost expression.
The most useful application of comma operator is in loops. In loops, it is used to update multiple variables in the same expression.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.