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.

getsSynopsisDescription#include char *gets(char *s);gets reads characters from standard input into the array pointed to by s until end-offileis encountered or a new-line character is read. Any new-line character is discarded,and a null character is written immediately after the last character read into the array.gets returns s if successful. If end-of-file is encountered and no characters have beenread into the array, the contents of the array remain unchanged and gets returns a nullpointer. If a read error occurs during the operation, the array contents areindeterminate and gets returns a null pointer.Portabilitygets con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See also getchar (page 288)printfSynopsisDescriptionPortability#include int printf(const char *<strong>for</strong>mat, ...);printf writes to the standard output stream using putchar, under control of the stringpointed to by <strong>for</strong>mat that specifies how subsequent arguments are converted <strong>for</strong>output.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.printf returns number of characters transmitted, or a negative value if an output orencoding error occurred.printf con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See Also Formatted output control strings (page 281)putcharSynopsisDescription#include int putchar(int c);putchar writes the character c to the standard output stream.putchar returns the character written. If a write error occurs, putchar returns EOF.Chapter 28 - Input/output functions289

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

Saved successfully!

Ooh no, something went wrong!