+ 2
Can someone explain me this question
What is output in this code: int a = (1,2,3,4); cout << a; I have answered 1,2,3,4 and the correct answer is 4. Why?
4 Answers
+ 8
comma operator evaluates left values and discrads results then returns right value
cout << (cout << 2, cout << 3, 4);
Output: 234
https://stackoverflow.com/q/52550/9132046
+ 1
Thanks
+ 1
Its not correct syntax for array,
I didn't get why they use simple brackets instead of curly braces
0
Valeti Naveen that's what confused me