C code must be compiled into a program before it runs.
Install a compiler: GCC (via MinGW-w64 or MSYS2 on Windows; preinstalled on most Linux), or Clang on macOS (Xcode tools).
Save your code as hello.c.
Compile: gcc hello.c -o hello
Run: ./hello (or hello.exe on Windows).
IDEs such as Code::Blocks, CLion and VS Code (with the C/C++ extension) make this easier.
💡 Key Takeaways: C Get Started
Mastering C Get Started helps you write clean and reliable C code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.
C Get Started Code Example
C
#include <stdio.h>
int main() {
printf("Compiled with GCC and running!\n");
return 0;
}
Output
Compiled with GCC and running!
Run this example on your own computer. The "Get Started" lesson shows how to set it up.
C Get Started Practice Exercises
Check what you learned in “C Get Started”.
/ 2 solved
Fill in the blank
Compile hello.c into a program called hello with GCC.