In c ,
main() {
int a = (1,2,3,4);
printf("%d",a);
}
yields an output of
4
This is because comma(,)operator has a right to left precedence . But
main() {
int a = {1,2,3,4};
printf("%d",a);
}
yields an output
1
anyone pls explain the logic behind this. Thanks