12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

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.

Gett<strong>in</strong>g Your Feet Wet<br />

When the program encounters a 0 <strong>in</strong> the character array, it <strong>in</strong>terprets that location as the end<br />

of the str<strong>in</strong>g. To see how this is done, enter and run List<strong>in</strong>g 1.6 as a console application.<br />

List<strong>in</strong>g 1.6. NULLTEST.CPP.<br />

1: #<strong>in</strong>clude <br />

2: #<strong>in</strong>clude <br />

3: #pragma hdrstop<br />

4:<br />

5: <strong>in</strong>t ma<strong>in</strong>(<strong>in</strong>t argc, char **argv)<br />

6: {<br />

7: char str[] = “This is a str<strong>in</strong>g.”;<br />

8: cout

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

Saved successfully!

Ooh no, something went wrong!