How do i run my .c file?

I downloaded a file for one of my classes called aesO.c i was told i needed to get my hands on a linux environment to run the code, which is what i accomplished here, however i’m not sure how to run the file of source code i was provided through the console. Any help would be great.


Or how do i add it to my environment to be ran is a better question i guess.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

A .c file is source code for a program written in the C language. You need to run a compiler to generate runnable code on your system. You’ll need a compiler, such as gcc, installed and then you’ll need to run

gcc aesO.c

You may need other arguments to gcc, depending on the code. If it doesn’t work, you should probably talk to your professor or TA (or a classmate who’s taken Computer Science courses) for more specific instructions