foo.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
foo.c: In function 'main':
foo.c:7:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
foo.c:7:7: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:8:1: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:8:1: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:9:1: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
foo.c:9:1: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
foo.c:10:9: error: redefinition of 'i'
foo.c:8:9: note: previous definition of 'i' was here
foo.c:10:1: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:11:1: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:13:1: warning: implicit declaration of function 'max' [-Wimplicit-function-declaration]
foo.c:15:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
foo.c:15:1: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c:17:1: warning: control reaches end of non-void function [-Wreturn-type]