//
Main.m
04-c language Keywords
//
Created by Vic fan on 16/7/12.
copyright©2016 year Li Hongqiang . All rights reserved.
//
C language Keywords
A- data-related
1) basic data Type (5 )
void empty no meaning
The char character occupies 1 bytes ( The nature of char is also a number )
int integer 4 bytes
float floating point number (decimal point ) retains 7 digits of valid digits
double retains valid digits - more precision
Valid numbers : These numbers are accurate.
The existence of data types is for more accurate
2) type modifier keyword (4 )
2.1 Short
What is the number of an integer representing 4 bytes ? 8 2 binary bits per byte
2 binary bit 2 of the X- Square = 4294967296
So short int accounts for 2 bytes to save more space
Short int = short int omitted
2.2 long
a long int represents 8 bytes to store an integer
Long Long is also 8 bytes in the computer has been replaced by a long
Conclusion : long int = long
2.3 signed
When describing a data , it is signed , assuming that the number of statistics cannot be negative
nature of Long int - signed long int
2.4 unsigned
3) Complex Type keywords (5 )
3.1 struct
defining struct types
3.2 Union
Defining Union types
3.3 enum
defining enum types
3.4 typedef
Type definition - defines the modifier as a simple name
definition of type
3.5 sizeof
Calculate the amount of memory that the data occupies
4) storage level keywords (6 ) Learn more
4.1 auto
Precede the variable with Auto , which refers to the default variable, which is used in the local variable
4.2 static
Representative :
1 static storage , processing variables
2 Local file access
4.3 register
Register variable
Fewer opportunities to use
4.4 const
Definition of constants
4.5 extern
Definition of external variables
4.6 volatile
Thread-related
B- process-related
1) jump structure of 4
1.1 return
The meaning of the End function
1.2Continue
Loop out of circulation
1.3 break
Jump out of the loop
1.4 goto
Can be executed from bottom to top
2) branching structure
if
Else
Switch
Case
default
3) cycle structure
while
Do
for
Summary :
1 ) General framework of C language - multi-file development
C language is composed of declarations and functions
2 ) introduction of the basic structure of C language
Drawing
#import <Foundation/Foundation.h>
int Main (int argc, const Char * argv[]) {
return 0;
}
Li Hongqiang iOS Development oc[016]c language keywords