Skip to the task
Layout
Back to classic view

You are looking ahead. Your place is still task 1: Algorithm.

RUNTask 5 of 21 · step 3: Your first programRun p01_hello
Run p01_hello in practice/01/

File → Reload CMake Project, then pick p01_hello at the top and click ▶ (Shift+F10). You can run the same in CLion's terminal too.

Checklist

  • Every task is one commit with a clear message.

Numbered notes in the code explain the important lines.

Details & hint
$ .\build\debug\practice\01\p01_hello.exe
Hello, world!

You should see: In the Run window: Hello, world! and "Process finished with exit code 0". Exit code 0 is your return 0;.

Stuck? p01_hello is not in the list? File → Reload CMake Project again, and check that the file is called exactly CMakeLists.txt.

practice 01 main.c Code Diff +6
A · NEW FILE git diff: every line is new (+6).
--- /dev/null
+++ b/practice/01/main.c
@@ -0,0 +1,6 @@
+ #include <stdio.h>
+
+ int main(void) {
+ printf("Hello, world!\n");
+ return 0;
+ }
opened for this task
$ .\build\debug\practice\01\p01_hello.exe
Hello, world!