0
What does parantheses do in this code
#include<stdio.h> int main() { Int a,x=(2,3,4,5); a=1,2,3,4,5; Printf("%d%d",x,a); return 0; }
1 ответ
+ 3
With parentheses, the comma operator is in effect.
https://docs.microsoft.com/en-us/cpp/cpp/comma-operator?view=vs-2019
For expression (a, b), a is evaluated, and then b is evaluated. The value of b is returned for the entire statement.
Without parentheses, the assignment operator takes precedence over the comma operator, assigning 1 to a.