12.05.2015 Views

type - David Vernon

type - David Vernon

type - David Vernon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Arrays, Pointers, and Strings<br />

In-Memory Format Conversion<br />

• sscanf()<br />

– fills a string with the characters representing the<br />

passed arguments<br />

#include <br />

...<br />

char s[50]=“123 456 \n98.756”;<br />

sprintf(s,“Sum: %6.3f Difference:%6.3f”,<br />

45 + 2.89, 45 - 2.89);<br />

Copyright © 2007 <strong>David</strong> <strong>Vernon</strong> (www.vernon.eu)

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

Saved successfully!

Ooh no, something went wrong!