Basic Output

In the C language, basic console output is achieved using functions from the “standard input output” header file (stdio.h).

Header File

C itself has no ability to output any information. In order to so, the stdio.h header file must be included in the program, which commonly happens at the top of the file:

#include <stdio.h>

Once this is done, the functions included in it can be used.

Basic Output

printf()
Print a string in the console.
putchar()
Print a char in the console.
puts()
Print a string in the console.

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn C on Codecademy

Contributors