The Comma Operator: The value of a series of expressions is the value of the right most : Comma operator « Operators statements « C++ Tutorial






#include <iostream>

using namespace std;

int main()
{
   long num1 = 0, num2 = 0, num3 = 0, num4 = 0;

   num4 = (num1 = 10, num2 = 20, num3 = 30);
   cout << num4;
   cout << endl;

   return 0;
}








3.4.Comma operator
3.4.1.Comma operator
3.4.2.Demonstrating the comma operator
3.4.3.The Comma Operator: The value of a series of expressions is the value of the right most
3.4.4.Using the continue statement with do while loop