I am new to c programming and I was coding some simple programs "Hello world" style.
In all of these programs I put #include<stdio.h>
in the top but I am not sure what this means exactly. I googled it and I found that stdio.h is a file that has commands for the preprocessor, but what is a preprocessor? I thought when I write code, I compile it and my code transforms to a form that a "computer" can read and then I can run it. Can somebody explain to me what the usage of this command is?
It looks for the stdio.h
file and effectively copy-pastes it in the place of this #include
statements. This file contains so-called function prototypes of functions such as printf()
, scanf()
, ... so that compiler knows what are their parameters and return values.