There are several interesting questions raised here regarding undefined behaviour in C. One of them is (slightly modified)
Does the following piece of code r
int i = 0, *a = &i;
there is a sequence point between declarations, therefore no UB here. However take a note that it is a bad idea to declare/define variables that way. Any normal coding standard would tell you declare one variable per line.
a[i] = i;
The i
is not changed in any way, therefore no UB here either.