C Basic Output
Published Aug 24, 2021Updated Oct 28, 2022
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()
- Prints a string in the console.
- putchar()
- Print a char in the console.
- puts()
- Outputs a string to the standard output or console during program execution.
- scanf()
- Reads a user input and assigns it to a variable.
Learn C on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours