#2019.7.11#
Chapter 1: Getting Started
Whence C?
Dennis Ritchie of Bell Labs created C in 1972 as he and Ken Thompson worked on designing the Unix operating system. C was created as a tool for working programmers, so it’s chief goal was to be a useful language.
Why C?
C’s many virtues:
①powerful control structures;
②fast;
③compact code-small programs;
④portable to other computers;
Design Features
Its design makes it natural for top-down planning, structured programming, and modular design.
Efficiency
C exhibits some of the fine control usually associated with an assembly language.
Portability
C is a portable language, which means that C programs written on one system can be run on other systems with little or no modification. Note, however, that the portions of a program written specifically to access particular hardware devices , such as a display monitor, or special features of an operating system, such as Windows 8 or OS X, typically are not portable.
Power and Flexibility
Most of the powerful, flexible Unix operating system was written in C.
Many compilers and interpreters for other languages --such as FORTRAN, Perl, Python, Pascal, LISP, Logo,and BASIC–have been written in C.
Programmer Oriented
C is less strict than, say, Pascal or even C++ in limiting what you can do. This flexibility is both a advantage and a danger.
Shortcomings
C gives you more freedom, but bit also puts more responsibility on you. As one computer preliterate once commented, the price of liberty is eternal vigilance.
Whither C?
C++ grafts object-oriented programming tools to the C language. C++ is nearly a superset of C, meaning that any C program is, or nearly is, a valid C++ program, too. By learning C, you also learn much of C++.
What Computers do?
How central processing unit(CPU) cooperate with random access memory(RAM) to run the machine language, which is a detailed, tedious, exacting task. High-level Computer Languages and Compilers
High-level languages-- such as C, Java, Pascal – describe actions in a more abstract form and aren’t ties to a particular CPU or instruction set.
#2019.7.12#
Language Standards
The First ANSI/ISO C Standard(C89/C90)(1989-1990)
Guiding Principles of C89/C90The C99 Standard:
①Internationalization
②Correction of dificiencies
③ improvement of computational usefulnessC99 hasn’t been as well received and supported by vendors as C90 was.
The C11 Standard
The language was revised because there was a need to track new technologies.
Using C: Seven Steps
Commentary
The moral here is that you should develop the habit of planning before coding.
Programming Mechanics
basename. extension