Introduction to LINUX programming: C Language

Source: Internet
Author: User
Tags dbase microsoft c
Introduction to LINUX programming: C language introduction-general Linux technology-Linux programming and kernel information. For details, refer to the following section. C language is the most popular and widely used high-level programming language in the world.

C language is better than other advanced languages for operating systems and system programs and hardware operations. Many large applications are written in C language.

The C language has strong plotting ability, portability, and strong data processing capabilities. Therefore, it is suitable for compiling system software, 3D, 2D graphics, and animation. It is a high-level language for numerical computing.

Common compilation software include Microsoft Visual C ++, Borland C ++, Watcom C ++, Borland C ++, Borland C ++ Builder, Borland C ++ 3.1 for DOS, watcom C ++ 11.0 for DOS, gnu djgpp c ++, Lccwin32 C Compiler 3.1, Microsoft C, High C, etc ......

C Language Development History

C language development is quite interesting. Its prototype is ALGOL 60 language.

In 1963, the University of Cambridge developed the ALGOL 60 Language into the CPL (Combined Programming Language) Language.

In 1967, Matin Richard of the University of Cambridge simplified the CPL language and produced the BCPL language.

In 1970, Ken Thompson of Bell Labs modified BCPL and gave it an interesting name "B Language ". It means to cook CPL language and extract its essence. He wrote the first UNIX operating system in Language B.

In 1973, language B also gave us a "boil", D. m. RITCHIE finally designs a new language based on the B language. He takes the second letter of BGPL as the name of the language, which is the C language.

To facilitate the promotion of UNIX operating systems, Dennis M. Ritchie published the C language compilation text "portable C language compilation program", which does not depend on the specific machine system in 1977.

In 1978, Brian W. Kernighian and Dennis M. Ritchie published The famous book "The C Programming Language", making C Language The most popular advanced Programming Language in The world.

In 1988, with the increasing popularity of micro-computers, many C language versions emerged. Because there is no unified standard, there are some inconsistencies between these C languages. To change this situation, the American National Institute of Standards (ANSI) has developed an ANSI standard for the C language and has become the main feature of the current C language standard. C language has developed rapidly and has become one of the most popular languages, mainly because it has powerful functions. Many well-known system software, such as DBASE Ⅲ PLUS and dbase iv, are written in C language. Using C language with some assembly language subroutines can better show the advantages of C language, such as PC-DOS, WORDSTAR, is written in this way.

Features of C Language

1. Simple, compact, flexible, and convenient

The C language has a total of 32 keywords, 9 control statements, and the program is free to write, mainly expressed in lower case letters. It combines the basic structure and statements of advanced languages with the practicability of low-level languages. The C language can perform operations like the assembly language on the position, byte, and address. These three are the most basic work units of the computer.

2. Rich Operators

The C operator has a wide range of 34 operators. The C language treats parentheses, assignments, and forced type conversion as operators. Thus, C's operation types are extremely rich and diverse expression types, and various operators can be flexibly used to achieve computation that is difficult to implement in other advanced languages.

3. Rich Data Structures

The Data Types of C include integer, real, String, array, pointer, struct, and shared body. It can be used to perform operations on various complex data types. The pointer concept is introduced to improve program efficiency. In addition, the C language has powerful graphics Functions and supports a variety of displays and drives. The computing and logic judgment functions are powerful.

4. C is a structured language

The distinctive feature of structured language is the separation of code and data, that is, each part of the program is independent of each other except the necessary information exchange. This structured method makes the program layers clear and easy to use, maintain, and debug. The C language is provided to users in the form of functions. These functions can be conveniently called and have multiple loops and conditional statements to control the program flow, so that the program is fully structured.

5. C syntax constraints are not strict, and the degree of freedom in programming is large.

Generally, the syntax check for advanced languages is strict, and almost all syntax errors can be checked. C allows programmers to have greater degrees of freedom.

6. The C language allows direct access to the physical address and can directly operate on the hardware.

Therefore, it has both advanced language functions and many low-level language functions. It can operate on the same position, byte, and address as the assembly language, and these three are the most basic work units of the computer, it can be used to write system software.

7. High quality of C language code generation and high efficiency of Program Execution

Generally, the efficiency is 10-20% lower than the target code generated by the assembler.

8. The C language is suitable for a wide range of applications and has good portability.

C language has a prominent advantage that it is suitable for a variety of operating systems, such as DOS and UNIX, and also for a variety of models.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.