2014.12.9 Afternoon C Language Review

Source: Internet
Author: User

Afternoon saw the structure, enumeration type, TypeDef, and finally I have not understood the things are understood, happy

Structs are similar to classes in object-oriented, but there is no way to think of different data types as a whole

An enumeration type is a link between a nonnegative integer and a string constant, such as an enum season {spring,summer,autumn,winter} s; s = Spring (equivalent to S = 0)

typedef is very important, the commonly used notation is typedef type name

It is particularly important to note the notation of struct pointers and function pointers.

typedef struct {int x;inty;} *p,point;

typedef int (*P) (int,int); You can call the original function directly with *p (Int,int)

Note that the essence of declaring pointer variables is to declare the type of address of the same variable, *p itself is not a type, just take that address worth

If the definition initialized is a constant like char *s = ""

2014.12.9 Afternoon C Language Review

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.