I want to initialize a value of all array members to their index.
int main()
{
int i;
int arr[10];
for (i = 0; i <= 9; i++)
arr[i] = i;
}
Should I consider the sequence point in this case?
Is arr[i] = i
legal and portable?
You need to consider sequence points if you modify something more than once in one place, or if you both read and modify something in one place.
You're not doing any of that, so your code is fine.