Chapter    5

Debugging

So far you’ve learned a lot about how to work with Xcode to create, edit, and run your very own programming projects. You’ve learned about functions, variables, operators, and the process of using those items to manipulate your program’s data. Hopefully, as you’ve been reading and making changes to your source code, you’ve been trying to anticipate the results of those changes. Learning how to “think like a computer” will be immensely useful as you develop your programming talent.

Sometimes it’s really convenient to know what the computer is actually doing. You did this in the Operators and Postfix projects by using the printf() statement, like this:

myInt = 3 * 2; printf( "myInt ---> %d\n", myInt );

The first statement ...

Get Learn C on the Mac: For OS X and iOS, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.