Keil Logo

puts

Summary
#include <stdio.h>

int puts (
  const char *string);   /* string to output */
Description

The puts function writes string followed by a newline character ('\n') to the output stream using the putchar function.

Note

  • This function is implementation-specific and is based on the operation of the putchar function. This function, as provided in the standard library, writes characters using the microcontroller's serial port. Custom functions may use other I/O devices.
Return Value

The puts function returns EOF if an error occurred and a value of 0 if no errors were encountered.

See Also

gets

Example
#include <stdio.h>

void tst_puts (void) {
  puts ("Line #1");
  puts ("Line #2");
  puts ("Line #3");
}
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.