ELF is what we've used since about '95, iirc.
a.out is a much older format, that doesn't support dynamic linking.
Use gcc -o foo foo.c to generate an executable. The file program will tell you what type it is. gcc will always generate ELF by default, ignore the file name