Skip to the task
Layout
Back to classic view

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

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

Write prinft instead of the first printf and click ▶. Why did a warning become an error, and what does GCC suggest?

Details & hint
C:/.../practice/01/main.c:4:5: error: implicit declaration of function 'prinft'; did you mean 'printf'? [-Werror=implicit-function-declaration]
    4 |     prinft("Hello, world!\n");
      |     ^~~~~~
      |     printf
cc1.exe: all warnings being treated as errors

Two rules: fix the first error (the others often go away with it) and read the whole line (the answer is often already there).

Stuck? The compiler does not know a function called prinft and suggests printf. It is a warning, but -Werror (the last line) turns every warning into an error. Put printf back.

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