Array Calculation
数组计算
Array Calculation
Intergrated initialization of arrays
1 | int a[] = {2,4,5,6,7}; |
- give the initial value of all elements of the array by directly using “{}”
- don’t need to give how large the array is, because the compiler will help you count.
locate Intergrated initialization
postscript: only C99
1 | int a[10] = { |
- locate initial data by [n]
- data have no located will attach it to the back of front
- other location will assign zero(0)
size of array
array assignment
full of source code
1 |
|