C · Lesson 1 of 3

👋 Your first C program

Use printf to print text from main.

#include <stdio.h> lets us use printf. The program starts in main.

#include <stdio.h>

int main() {
    printf("Hello, CodingKida!\n");
    return 0;
}
OUTPUTHello, CodingKida!

\n means new line. return 0 tells the computer the program finished well.

✏️ Your turn

Open this example in the playground, change it and run it.

▶ Try it yourself

🧠 Quick quiz

What does \n do in printf?