+ 2

How is this even working with "," instead of ";" i even ran this code on PC and it worked???Help Please

https://code.sololearn.com/cvczTqQ6wPnX/?ref=app

3rd Feb 2018, 6:27 PM
Naveen Gupta
8 Respostas
+ 5
Not as a delimiting... It is an operator(like an evaluator). Consider the next expresion: int a=0,b=1,c; //Here it is a separator. c = (a++, b+1); //Here is an operator. cout << c << endl; //outputs: 2 cout << a << endl; //outputs: 1 It can be a perfect quiz...
3rd Feb 2018, 7:16 PM
Fabio
+ 5
It is a little confusing... So i leave you the link. https://www.tutorialspoint.com/cplusplus/cpp_comma_operator.htm
3rd Feb 2018, 6:58 PM
Fabio
+ 5
You're Welcome! đŸ’Ș
3rd Feb 2018, 7:21 PM
Fabio
+ 3
It is called Comma Operator... And it is also used to evaluate two or more expressions, returning the last expression as the resulting value. Either way, it executes the other instructions.
3rd Feb 2018, 6:50 PM
Fabio
+ 2
can u elaborate it more please?
3rd Feb 2018, 6:54 PM
Naveen Gupta
+ 1
well Thanks for the link.... i opened it but still iam confused how does comma is used as a line terminator?
3rd Feb 2018, 7:02 PM
Naveen Gupta
+ 1
đŸ˜…đŸ˜…đŸ€”đŸ€”đŸ€”
3rd Feb 2018, 7:19 PM
Naveen Gupta
+ 1
i get it ...but not that much 😅 still thanks for ur efforts 😇
3rd Feb 2018, 7:20 PM
Naveen Gupta