C Tutorial · Chapter 4 of 16
C Output
Display text with printf.
printf prints text to the console. Use \n for a new line.
Later you will print variables with format specifiers such as %d, %f, and %s.
printf example
Try it Yourself »
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
printf("CoderKiosk C Lab\n");
return 0;
}
Classroom Tips
- Put quotes around text.
- Escape sequences like \n must be written carefully.