Am from high level OOP languages C# and Java and recently started scratching my head in C. I feel C a bit weird as equally as one feels JS is. So want to clarify below:
1.
int i, j;
i = 3,0,1,2;
printf("%d\n", i); => prints 3
2.
i = 3,j =7;
printf("%d, %d\n", i, j); => prints 3 and 7
i = 3,0,1,2; This assigns 3 to i, then executes 0, 1 and 2. Check the 2nd example I mentioned.
Also, Try i=3;0;1;2; This will not report any error. It will just execute (i=3), (0), (1) and (2).