As a beginner, I am trying to write a simple c program to learn and execute the \"write\" function.
I am trying to execute a simple c program simple_write.c
You cannot execute C source code in Linux (or other systems) directly.
C is a language that requires compilation to binary format.
You need to install C compiler (the actual procedure differs depending on your system), compile your program and only then you can execute it.
Currently it was interpreted by shell. The first two lines starting with # were ignored as comments. The third line caused a syntax error.