Sams Teach Yourself C Programming
Hour 1 - Getting Started Sams Teach Yourself C in 24 Hours Hour 1 - Getting Started A journey of a thousand miles is started by taking the first step. Chinese proverb High thoughts must have high language. Aristophanes Welcome to Teach Yourself C in 24 Hours.
Teach Yourself in 24 Hours Tony Zhang C. A Simple C Program. Xii Sams Teach Yourself C in 24 Hours.
In this first lesson you'll learn the following: • What C is • Why you need to learn C • The ANSI standard • Hardware and software required in order to run the C program C is a programming language. The C language was first developed in 1972 by Dennis Ritchie at AT&T Bell Labs. Ritchie called his newly developed language C simply because there was a B programming language already. (As a matter of fact, the B language led to the development of C.) C is a high-level programming language. In fact, C is one of the most popular general-purpose programming languages. Download Free Sales Distribution Management Pdf Ebook Center. Applied Mathematics 3rd Edition Malik Sealy. In the computer world, the further a programming language is from the computer architecture, the higher the language's level.
You can imagine that the lowest-level languages are machine languages that computers understand directly. The high-level programming languages, on the other hand, are closer to our human languages. (See Figure 1.1.) Figure 1.1. The language spectrum.
High-level programming languages, including C, have the following advantages: • Readability: Programs are easy to read. • Maintainability: Programs are easy to maintain. • Portability: Programs are easy to port across different computer platforms. The C language's readability and maintainability benefit directly from its relative closeness to human languages, especially English.
Each high-level language needs a compiler or an interpreter to translate instructions written in the high-level programming language into a machine language that a computer can understand and execute. Different machines may need different compilers or interpreters for the same programming language. For instance, I use Microsoft's C compiler to compile the C programs in this book for my personal computer (PC). If I need to run the C programs on a UNIX-based workstation, I have to use another type of C compiler to compile these programs. Therefore, the portability of programs written in C is realized by re-compiling the programs with different compilers for different machines. (See Figure 1.2.) Figure 1.2.
Porting programs written in C into different types of computers. Barry Harris Jazz Workshop Pdf Merge. The Computer's Brain You may know that the brain of a computer is the central processing unit (CPU). Some computers may have more than one CPU inside.
A CPU has millions of transistors that make use of electronic switches. The electronic switches have only two states: off and on. (Symbolically, 0 and 1 are used to represent the two states.) Therefore, a computer can only understand instructions consisting of series of 0s and 1s. In other words, machine-readable instructions have to be in binary format. However, a computer program written in a high-level language, such as C, Java, or Perl, is just a text file, consisting of English-like characters and words. We have to use some special programs, called compilers or interpreters, to translate such a program into a machine-readable code.