Skip to the task
Layout
Back to classic view

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

CHECKTask 8 of 21 · step 4: An algorithm as a sequence of statementsRead the error: a missing ;
Read the error: a missing ; in practice/01/

Delete the semicolon after the first printf and click ▶. Which line and column is the error on, and what does GCC suggest?

Details & hint

In the build window you see:

C:/.../practice/01/main.c: In function 'main':
C:/.../practice/01/main.c:4:30: error: expected ';' before 'printf'
    4 |     printf("Hello, world!\n")
      |                              ^
      |                              ;
    5 |     printf("\n");
      |     ~~~~~~

An error line always has the same shape: file:line:column: error: what is wrong.

Stuck? Line 4, column 30, right after the ). GCC shows a ^ and writes ; under it: exactly what is missing. Put the ; back and check that the program works again.

practice 01 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p01_hello main.c)