Comma Operator Assignment Help

Assignment Help: >> Data Types, Variables and Operators in C++ - Comma Operator

Comma Operator

The comma operator is used to string together various expressions. Essentially, the comma causes a sequence of operations to be performed. Whenever it is used on the right side of the assignment statement, the final expression of the comma-separated list is the value assigned to the expression.

Example:

y= 10;

x = (y- = 5, 25 / y);

After execution, x will have the value 5 since y's original value is reduced through 5, and then that value is divided into 25, yielding 5 as the result.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd