First you have to save your code in a document, Then go to command prompt type the code cd (folder name) next you have type your compiler code along with your document name. Then use ./a.out code
For example,
I created a language folder. In that, I created program.c document which has code in it, Now I have to go to command prompt and type cd language code.
if I am using gcc compiler, I have to enter gcc program.c
if there is no errors, It get compiled. Then i have to enter ./a.out code to execute the program