Some concise generalizations of C language

Source: Internet
Author: User

Preface: I want to write a language about OC directly, but I still want to say C first.

First language Features

C is process-oriented, there is no class and object concept, there is no encapsulation (this? ), inheritance, polymorphism and other characteristics.

and is intermediate language, its compilation process includes: Precompilation (include, macros, conditional compilation, etc.), compiled into assembly, connection.

Re-language properties

1. Data type, this is more than N, much more suitable for writing database

2. Condition control, this is basically the same as other languages

3. operator, which is basically the same as in other languages

(where bitwise arithmetic: ~ Take anti-,& and,!) Or, ^ also or [not simultaneously for true],<< left shift,>> right Shift]

4. (one-dimensional) array, string, array initialization address continuous, array (name) represents the first address, the string is a character array after adding '

5. The pointer, known as the most difficult syntax in C, is actually an address.

A. A pointer to a pointer, in fact, the pointer is only the type of pointer. Dizzy, still a bit around!

B. Arrays and pointers, this is a bit of a perversion, that is, the array (name) can and (pointing) pointer have almost the same effect

(Just almost the same, but also a little different, such as string assignment to arrays and pointers is not the same!) A variable with a constant)

C. Point to the function pointer, which is like a delegate in C #, that is, a pointer to a method, or whatever the first address of a call is.

6. Structures & Communities, structs for fused arrays can only be different types produced by the consent type, whereas the community and struct are similar, just a common piece of storage address

7. Enumerate &typeof, just say TypeOf, its role is to define the simplification of a type or function

The other seems to be nothing, in fact, C is not very magical. Halo seems to have missed a function & variable, this to also a little something, which involves a little concept,

First of all, stack: Stack, is the continuous storage of the system automatically manage a small amount of space, generally store the basic data type; heap, and Stack opposite, general store custom type, etc.

In addition, dynamic static storage area: The dynamics of the use of the end is gone, if the function of internal variables;

(This is also involved in C's process-oriented feature is the scope of action, the default scope of the external variable is from the beginning of the declaration to the end of this file, the internal does not say.)

extern declarations can make other files accessible, default; Static declarations are accessible only to themselves)

Finally, inside and outside functions: the front and inside variables are similar, but because C has a header file, the general private method is not defined as long as it is not in the H file.

There seems to be some unpopular design registers (that is, CPU) AH---a little involved in the underlying embedded development, there are some weird functions or something there is no need to say more.

PS, the next time to summarize the common network security Attack & Prevention mode, or front-end optimization, backend distribution, or OC language (java&c# only worth talking about architecture), or, a bit more, a bit chaotic ...

Some concise generalizations 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.