C keyword control statement operator Summary

Source: Internet
Author: User

From "n you must knowC LanguageProblem ", people mail, do not know why there are many errors in the original version. I just picked some key points.

I. Key Points

Bit, byte, and address operations

 

2. 32 keywords (do not confuse them with macro definitions (null, EOF)

 Int , Float , Double , Char , Struct , Union, Enum , Void , Typedef
Long , Short , Signed, unsigned,
Const , Static , Volatile , Auto, Extern , Register
If , Else , Do , While , For , Goto , Switch , Case , Default
Break , Continue , Return
Sizeof

 

3. Nine control statements

 
If(Else)
Switch
While,Do-While
For
Goto
Break,Continue,Return

4. 34 operators

+-*/%
><>= <=
=! =
=
~ ^ (Exclusive or) | & >>< <
& |!
* & (Get address)->. (structure member)Sizeof? :
() []
++ --
-Negative
, Comma
(Type) Forced type conversion

Ten extended operators:

 
+ =-= * =/= % =
>>=<<=<=^= | =

5. Basic Data Types

Integer int, float, Char, array, struct, pointer, shared body Union

 

Vi. Miscellaneous

Usually, you need to convert the logicCodeThinking, pay attention to cultivate

 

C is suitable for compiling operating systems and hardware drivers (the underlying development must be familiar)

C ++ is suitable for games and software, but some people think it is too bloated and terrible.

 

Compiler:

Compile: source code -- machine language -- target file (. o file, or. OBJ file) (it is very important for large projects to generate target files !)

Link: target file + system library file -- Executable File

 

Variable name (Storage Unit Address) = value (storage value) (essential)

 

VII. Summary

From the perspective of the keywords, control statements, and operators of C, C is relatively simple. In fact, C is flexible, powerful, and not so easy to grasp.

I like this language to use simple things to handle complicated transactions.

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.