title: Who detects misspelled function name? Compiler or Linker?
body: <p>According to C How to Program (Deitel):</p>
  
  <blockquote>
    <p>Standard library functions like printf and scanf are not part of the C programming language. For example, the compiler cannot find a spelling error in printf or scanf. When the compiler compiles a printf statement, it merely provides space in the object program for a “call” to the library function. But the compiler does not know where the library functions are—the linker does. When the linker runs, it locates the library functions and inserts the proper calls to these library functions in the object program. Now the object program is complete and ready to be executed. For this reason, the linked program is called an executable. If the function name is misspelled, <strong>it is the linker which will spot the error</strong>, because it will not be able to match the name in the C program with the name of any known function in the libraries.</p>
  </blockquote>
  
  <p>These statements leave me doubtful because of the existence of header file. These files are included during the preprocessing phase, before the compiling one, and, as I read, there are used by the compiler.</p>
  
  <p>So if I write <code>print</code> instead of <code>printf</code> how can't the compiler see that there is no function declared with that name and throw an error? </p>
  
  <p>If it is as the book says, why can I declare function in header files if the compiler doesn't watch them?</p>