Learning to read programs written in the “C” language is one of the hurdles that must be overcome before you will be able to study the source code of UNIX effectively.
As with natural languages, reading is an easier skill to acquire than writing. Even so you will need to be careful lest some of the more subtle points pass you by.
There are two of the “UNIX Documents” which relate directly to the “C” language:
“C Reference Manual”, by Dennis Ritchie
“Programming in C – A Tutorial”, by Brian Kernighan
You should read them now, as far as you can, and return to reread them from time to time with increasing comprehension.
Learning to write “C” programs is not required. However if you have the opportunity, you should attempt to write at least a few small programs. This does represent the accepted way to learn a programming language, and your understanding of the proper use of such items as:
semicolons;
“=” and “==”
“{” and “}”
“” and “
”
declarations;
register variables;
“if” and “for” statements
You will find that “C” is a very convenient language for accessing and manipulating data structures and character strings, which is what a large part of operating systems is about. As befits a terminal oriented language, which requires concise, compact expression, “C” uses a large character set and makes many symbols such as “*” and “&” work hard. In this respect it invites comparison with APL.
There many features of “C” which are reminiscent of PL/1, but it goes well beyond the latter in the range of facilities provided for structured programming.