0

I am not sure if a comma in an array initializer is actually a sequence point. Has the statement below defined behavior? The standard does not discuss side-effects during aggregate initialization specifically (I think), so I assumed implementation behavior myself, but I had to ask

char s[7] = {'a', s[0], s[1], s[2], s[3], s[4], 0};

 int a[3]= { *ptr++,*ptr++,*ptr++}
2501
  • 25,460
  • 4
  • 47
  • 87
Bharat Ahuja
  • 394
  • 2
  • 15

0 Answers0