Keil Logo Arm Logo

CARM User's Guide

Discontinued

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");
}

Keil logo

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.