Console မှာ စာသား၊ number, variable value တွေထုတ်ပြချင်ရင် printf() ကိုသုံးပါတယ်။ Output ကို line အသစ်တစ်ကြောင်းဆင်းချင်ရင် ကိုထည့်ပါ။
c
#include <stdio.h>
int main() {
printf("Hello World!
");
printf("I am learning C.
");
printf("C is fast and powerful.");
return 0;
}ပထမ printf() နဲ့ ဒုတိယ printf() မှာ ပါတဲ့အတွက် output က line ခွဲပြီးပြပါတယ်။ နောက်ဆုံး line မှာ မပါတဲ့အတွက် cursor က အဲဒီစာသားနောက်မှာပဲ ရပ်နေပါမယ်။
You should see
Hello World! I am learning C. C is fast and powerful.Info
က screen မှာ စာလုံးအဖြစ်မပေါ်ပါ။ New line command အနေနဲ့ အလုပ်လုပ်ပါတယ်။