I have a line of code,
int numbers[n];
for( i = 0; i < n; ++i, numbers [i] = i );
is , a sequence point here?
or is it undefined?
++i, numbers[i] = i;
comma here, is acting as an operator or separator, inside the for loop?
Quote from: Tapasweni Pathak on January 01, 2014, 12:32:16 PM
I have a line of code,
int numbers[n];
for( i = 0; i < n; ++i, numbers [i] = i );
is , a sequence point here?
What you means for sequence point?
Quote from: Tapasweni Pathak on January 01, 2014, 12:32:16 PM
++i, numbers[i] = i;
comma here, is acting as an operator or separator, inside the for loop?
The comma is acting as 'C' comma operator: separates two statements discarding the result of the first one.
Look here for more details. (http://en.wikipedia.org/wiki/Comma_operator)