codegurukool.com · Free coding tutorials & online compiler

Home › C Tutorial › C get started

C get started

Install a compiler and build.

Install gcc (or use an online compiler or an IDE like Code::Blocks). Save as main.c, compile with gcc main.c -o main and run ./main.

Example code

/* Terminal:
   gcc main.c -o main
   ./main
*/
#include <stdio.h>
int main() {
  printf("It works\n");
  return 0;
}

Run this code in the online editor

← C installationC syntax →