11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Portabilityputchar con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See also Customizing putchar, puts (page 290)putsSynopsisDescriptionPortability#include int puts(const char *s);puts writes the string pointed to by s to the standard output stream using putchar andappends a new-line character to the output. The terminating null character is notwritten.puts returns EOF if a write error occurs; otherwise it returns a nonnegative value.puts con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See also putchar (page 289)scanfSynopsisDescriptionPortability#include int scanf(const char *<strong>for</strong>mat, ...);scanf reads input from the standard input stream under control of the string pointedto by <strong>for</strong>mat that specifies the admissible input sequences and how they are to beconverted <strong>for</strong> assignment, using subsequent arguments as pointers to the objects toreceive the converted input.If there are insufficient arguments <strong>for</strong> the <strong>for</strong>mat, the behavior is undefined. If the<strong>for</strong>mat is exhausted while arguments remain, the excess arguments are evaluated butare otherwise ignored.scanf returns the value of the macro EOF if an input failure occurs be<strong>for</strong>e anyconversion. Otherwise, scanf returns the number of input items assigned, which canbe fewer than provided <strong>for</strong>, or even zero, in the event of an early matching failure.scanf con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See Also Formatted input control strings (page 285)snprintfSynopsisDescription#include int snprintf(char *s, size_t n, const char *<strong>for</strong>mat, ...);snprintf writes to the string pointed to by s under control of the string pointed to by<strong>for</strong>mat that specifies how subsequent arguments are converted <strong>for</strong> output.290 Chapter 28 Standard C Library Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!