06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

scanf pREPC+ <strong>System</strong> <strong>Calls</strong><br />

scanf <strong>Read</strong>s formatted input from stdin.<br />

#include <br />

#include <br />

int scanf(<br />

const char *format, /* format control */<br />

... /* arguments 1 through n */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

The scanf() function is equivalent to fscanf() except that scanf() takes the<br />

input from the standard input device.<br />

format Points to the format control string. For more information,<br />

see fscanf on page 3-56.<br />

... Arguments 1 through n point to variables where input is<br />

stored.<br />

This function returns EOF and sets errno if an input failure occurs before any<br />

conversion. Otherwise, it returns the number of input items assigned, which can be<br />

fewer than provided, even zero, in the event of an early matching failure.<br />

Refer to Appendix B.<br />

3-130 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

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

Saved successfully!

Ooh no, something went wrong!