puts()
Anonymous contributor
Published Oct 28, 2022
Contribute to Docs
The puts()
, or “put string”, function prints a string to stdout
, normally the console, followed by a newline character.
Syntax
puts(str)
The puts()
function takes a str
argument and prints it, adding a newline character at the end of it.
Example
#include <stdio.h>int main(void) {puts("Hello World!");return 0;}
The output would be:
Hello World!
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.