Appendix A. C Primer

This book assumes a basic knowledge of C. This appendix is a quick primer for people who know languages with C-like syntax, such as Java or JavaScript.

People new to C might refer to The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie, which is a concise but complete introduction to C.

Functions

C programs are built from functions. Each function takes a number of arguments and can optionally return an answer. There is no concept of objects as used in Java. The function called to start a program is called main(). main() takes as argument an array of strings specifying the command-line arguments used to start the program. For instance, if you type man strlen, man’s main function will see numberOfArguments ...

Get Sams Teach Yourself Cocoa Touch™ Programming in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.