So, I did as instructed:
use gedit to write the code, save it in .c format, open the terminal, write
$cc -c example.c
$cc -o pun pun.c
$./pun.c

Slight redundancy here... when you run cc -c example.c that gives you an object file, example.o, then you run cc -o pun pun.c (ignoring the newly created object file example.o) which compiles pun.c into pun (without the need of a 2 step object->link manual process using the -c parameter then linking)

To explain what is going on here is that the C source file is trying to be interpreted as a script by the default shell interpreter in your environment....

Whats really strange is that the source code has the executable bit set in the first place? What I mean is that you SHOULD
of gotten a Permission Denied error letting you know that executing that file is not allowed based on file permissions.