12.05.2015 Views

type - David Vernon

type - David Vernon

type - David Vernon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Arrays, Pointers, and Strings<br />

Strings<br />

• “ABC”<br />

– effectively an array with four char elements:<br />

– ‘A’, ‘B’, ‘C’, and ‘\0’<br />

– The value of this string is the address of its first<br />

character and its <strong>type</strong> is pointer_to_char<br />

”ABC”[0] is equal to ‘A’<br />

”ABC”[1] is equal to ‘B’<br />

”ABC”[2] is equal to ‘C’<br />

”ABC”[3] is equal to ‘\0’<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!