006 - printf
“printf” is the name of one of the most well known and most used functions in the C programming language.
It stands for “print formatted” and it’s used to display output on the screen in a formatted way, by using a simple structured template language.
Equivalent or similar functions exist in many other programming languages.
For example, to display two numbers with a dash in between,
printf could be
used this way:
printf("%d-%d", first_number, second_number);
In this example,
%d is the template used to indicate a number (the “d” stands
printf replaces this with the number provided in the
Because displaying text on screen is a very easy way to see the effect of
running a program,
printf is often the first function introduced when learning
how to code.
The function name also became well known over the years and is sometimes used
to refer to the general idea of displaying things on the screen. For example,
the term “printf debugging” is used to denote using
printf statements to track
the flow of execution when debugging code.