Array (c language):
1, set;
2, the orderly collection;
3. Same data type
Type specifier array name [constant expression (length)] (C language does not support dynamic length)
(Can be either a basic data type or a constructed data type)
const int A; const constant, readable only
Initialization
int a[5]={0,0,0,0,0};
a[5]={1,2};
={};
Cannot empty one or more element assignments (can be less than empty)
Assigning a value using a circular method
A special array
Char str[20] = {' A ', ' B ', ' C '};
= "Hello World";(consecutive characters)
The form of initialization
A[10] = {1,2,3,4}; You can only use curly braces to assign values at the time of definition initialization
STR[20] = "Hello";
Accessing array elements
Subscript method to access the 0~length-1
B[1]//second element
Bubble sort
Double loop
Outer loop indicates sort count
Inner Loop Two adjacent elements comparison
"C Language" basis (V) array