📜  数组的大小 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:43.960000             🧑  作者: Mango

代码示例5
#include #include int main(){//a pointer to dynamically allocated memory from the heap is returned.    int *a = (int *) malloc(20 * sizeof(int));for(int i = 0; i < 20; i++)a[i] = i + 1;printf("\nThe contents of the array are: \n");for(int i = 0; i < 20; i++)printf("%d\t", a[i]);realloc(a, 40);for(int