69,382
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <malloc.h>
int Count(int* arr)
{
int n = 0;
//以下代码计算不正确
while((arr+n) != NULL){
n++;
}
return n;
}
int main()
{
int arr[6] = {1,4,5,8,12,20};
printf("count = %d\n", Count(arr));
retunrn 0;
}