prog.c: In function 'main':
prog.c:5:2: warning: implicit declaration of function 'foo' [-Wimplicit-function-declaration]
foo("%x");
^
prog.c: At top level:
prog.c:9:6: warning: conflicting types for 'foo'
void foo(char *str)
^
prog.c:5:2: note: previous implicit declaration of 'foo' was here
foo("%x");
^
prog.c: In function 'foo':
prog.c:15:9: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'char *' [-Wformat=]
printf("\n%x",&c);
^
prog.c:16:9: error: \x used with no following hex digits
printf("\x hi");
^