What are the characteristics of C language?

Source: Internet
Author: User

C language is often referred to as intermediate computer language. Intermediate language is not derogatory, does not mean that it is poor in function, difficult to use, or than B a s I C,P a s c a l , such as the original high-level language, does not mean that it is similar to assembly language, will bring similar trouble to the user. C language is called intermediate language, because it combines the components of high-level language with the function of assembly language.

as intermediate language, c allow bitwise, Byte and address these computer functions in the basic components of the operation. c

All high-level languages support the concept of data types. A data type defines a range of values for a variable and a set of operations on which it can be manipulated. Common data types are integer, character, and real. Although c language has five basic data types, but with Span style= "font-family: ' Times New Roman ';" >p a s c a l or a d a c The program allows almost all types of conversions. For example, character and integer data can be freely mixed in most expressions. This is not allowed in strongly typed high-level languages.

c 3 2 keywords, these keywords are composed of c language commands. and ibm pc b a s i c 1 5 9

C language is a structured language

Although from a strict academic point of view,Clanguage is a block structure (b l o C k-s t r u c t u r e d) language, but it is often referred to as a structured language. This is because it is structurally similar toA l G O l,P a s c a land theM o d u l a-2(technically speaking, block-structured languages allow you to define procedures or functions in procedures and functions.) In this way, global and local concepts can be extended by scope rules, and scope manages the visibility of variables and procedures. BecauseCThe language does not allow functions to be defined in a function, so it cannot be called a block-structured language in the usual sense.

The salient feature of structured language is the separation of code and data. This language can separate and hide the instructions and data that perform a particular task from the rest of the program. One way to get quarantined is to call a subroutine that uses a local (temporary) variable. By using local variables, we can write subroutines that have no side effects on other parts of the program. This makes it very easy to write programs that share code snippets. If you develop some well-separated functions, we just need to know what the function does and not know how to do it when referencing. Remember: Excessive use of global variables (variables that can be accessed by all programs) can introduce errors into your program due to unintended side effects.

Structured languages are easier to program than unstructured languages, and the clarity of programs written in structured languages makes them easier to maintain. This is a widely accepted view of the population.

C the main structural component of language is the function C of the independent sub-program.

In C language, a function is a component (a program block), which is the basic component to complete the function of a program. Functions allow the tasks of a program to be individually defined and coded to make the program modular. You can be sure that a good function works correctly and does not have side effects on other parts of the program.

C language is the language of the programmer

> Maybe you'll ask, "Aren't all computer languages programmers use?" "The answer is decidedly" no ". We consider the typical non-programmer language c o b o l b a s i c c o b o l

but c o b o l c o b o l BASIC  The main purpose is to allow non-professional programmers to program on the computer to solve the relatively simple problem. In stark contrast to this is the language , because program generation, modification, and field testing are performed by real programmers from start to finish, it implements the programmer's expectations: few constraints, few forcing, block structure, independent functions, and a compact set of keywords. With c language programming, Programmers can get efficient machine code, which is nearly as efficient as assembly language code.

Another reason the C language is widely used by programmers is that it can be used instead of assembly language. Assembly instructions used in assembler are symbolic representations of binary machine codes that can be executed directly on a computer. Each operation of assembly language corresponds to a single instruction executed by the computer. While assembly language gives programmers the potential to achieve maximum flexibility and maximum efficiency, the difficulty of developing and debugging assembly-language programs is unbearable. Non-structural makes assembly language programs difficult to read, improve and maintain. Perhaps more importantly, assembly language programs cannot be ported between machines that use different C P U .

Initially, theC language was used for System program design. A "System program" is part of a large class of programs that make up the computer's operating system and utility programs. Commonly referred to as System programs are:

Operating system.

Translation procedures.

Edit the program.

Assembler program.

Compile the program.

Database management program.

with c language popularization, coupled with its portability and efficiency, Many programmers use it to design various programs. Almost all computers have c language compiler program, This allows us to make little or no changes to the C 

C language not only has its advantages in terms of speed and structure, but each C language system provides a special library of functions, programmers can tailor the different needs to adapt to the design of various programs. Because it allows (and more accurately encourages) compilation separately, the C language allows programmers to easily manage large projects and minimize duplication of effort.


What are the characteristics of C language?

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.