C code ကို run လုပ်ဖို့ compiler လိုပါတယ်။ Compiler ဆိုတာ သင်ရေးထားတဲ့ .c file ကို computer နားလည်နိုင်တဲ့ executable program အဖြစ်ပြောင်းပေးတဲ့ tool ပါ။ စတင်လေ့လာနေတဲ့အချိန်မှာ online editor သုံးလို့ရပြီး project တကယ်လုပ်ချင်လာရင် local computer မှာ GCC သို့မဟုတ် Clang ကို setup လုပ်တာက ပိုကောင်းပါတယ်။
c
// hello.c
#include <stdio.h>
int main() {
printf("Hello C learner!
");
return 0;
}#include <stdio.h> က printf() သုံးနိုင်ဖို့ library ထည့်တာပါ။ main() က program စတင် run မယ့်နေရာဖြစ်ပြီး return 0; က program အောင်မြင်စွာပြီးဆုံးကြောင်း operating system ကိုပြန်ပြောတာပါ။
You should see
Hello C learner!Info
File name ကို hello.c လို .c extension နဲ့ သိမ်းပါ။ Terminal မှာ gcc hello.c -o hello လို့ compile လုပ်ပြီး ./hello နဲ့ run နိုင်ပါတယ်။