[C language tutorial] Chapter III C language data types

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
➤ micro-channel public number: to dare (WeiGanTechnologies)
➤ blog Park address: San-ching Wing Chi ( https://www.cnblogs.com/strengthen/ )
➤GitHub address: https://github.com/strengthen/LeetCode
➤ original address: HTTPS: //www.cnblogs. com / strengthen / p / 11416763.html 
➤ If the address is not a link blog Park Yong Shan Chi, it may be crawling author of the article.
➤ text has been modified update! Click strongly recommended that the original address read! Support authors! Support the original!
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

First, the variable and constant data

In the world of the program, in accordance with instructions that allows the computer to do a lot of things, such as numerical calculation, image display, voice chat, video playback, astronomical calculations, send e-mail, games, graphics and anything we can imagine things. To accomplish these tasks, the program requires the use of data that carry digital and character information. 
In the computer, and the nature of the data representation may be different. It is necessary to classify the data of the same nature, and are described with a certain data type. Any user data constants and variables are presented in two forms. It refers to an amount which is a constant value can not be changed at run time. Constant does not account for the memory, the program is run it appears directly as the operation target various registers in the arithmetic unit. Refers to an amount variable in the program is running its value can be changed. Variable function is to store data. example:  

1 #include<stdio.h>
2 int main()
3 {
4     int year;
5     year=20146     printf("Welcome to www.dotcpp.com!\n");
7     return 08 }

Where year is a variable of type int, and 2014 is a constant, i.e. a digit.     

Definition of variables: 
variable name used in the program, the function name, and the like collectively referred to as reference identifier. In addition to the function name of the function defined by the system library, to rest by the user-defined. 
C provides only alphabetic identifier (A ~ Z, a ~ z ), numbers (0 to 9), underscore (_) character string composed, and the first character must be a letter or underscore. And must be unique C language keywords (keyword see next section). 

Furthermore, care must be taken in using the identifier Shihai following: 
  (1) Standard C does not limit the length of the identifier, but it is restricted by the C language compiler various versions of the system, but also is subject to particular machines. For example, before a predetermined identifier in a version of the eight valid C, when the first two identifiers are the same eight is considered to be the same identifier. 
  (2) in the identifier, in case there is a difference. E.g. CLANG and Clang are two different identifiers. 
  (3) Although the random identifier may be defined by the programmer, but the identifier is used to identify a certain amount of symbols. Therefore, the name should have a corresponding meaning to reading comprehension, so that "by definition."

Guess you like

Origin www.cnblogs.com/strengthen/p/11416763.html