Your first C program
Every C program starts at a function called main. When main returns, the program ends, and the number it returns is the exit status the operating system sees — 0 means "nothing went wrong".
printf writes text to the terminal. It lives in the standard input/output library, so a program that uses it has to say #include <stdio.h> at the top. Without that line a real compiler warns you, and then does something you did not ask for.
The \n at the end of a string is a newline. C does not add one for you: without it the next thing printed continues on the same line.
Example
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
}prints: "Hello, World!\n"
Four things to notice: the include, the return type of main, the semicolon, and the \n.
Your task
Print exactly two lines: Hello, C. and then I am learning systems programming.
Stuck?
Explain it
What would happen if you left out the \n at the end of the first string?
Where this goes
Project 1 asks you to write and compile this program yourself, then look at what each stage of the compiler produced. You have just written the source; the project is about what happens to it next.
This is a teaching runtime for a subset of C, running in your browser on a 32-bit model machine. It reports mistakes a real compiler lets through — reading uninitialised memory, running off an array, signed overflow — and it is not the compiler your project uses.
Press Run to see what your program does, or Check when you think it is right. Everything runs here in your browser.