Already the first example is wrong. So I stopped reading.
% cc -std=c11 -o dingens dingens.c dingens.c:6:9: error: redefinition of 'i' int i = 10; ^ dingens.c:5:9: note: previous definition is here int i; ^ 1 error generated. % cat dingens.c
#include <stdio.h>
int main() { int i; int i = 10;
printf("hello, world\n");
return 0;
}%