You need to state how you got gcc to create the a.out file and how you are attempting to execute it. Direct pasting of commands used, and entire outputs thereof, is the accepted way to do this.
Are you sure a.out is a binary? (And not, say, object code?)
Did you remember to make the file executable?
Is the file in your path?
If your source code is in a file called "hello.c", then try the following commands:
$ gcc -ansi -pedantic -Wall -O2 -o hello hello.c
(creates an executable "hello" in the same directory, and also makes sure you have done everything else OK. This is a good way to start out, the compiler will tell you about every mistake you make.)
$ chmod a+x hello
(make "hello" executable so you can run it)
(since "hello" is unlikely to be in your PATH environment variable, you need to tell linux where to go look for it. The dot says "look right here".)