какое из следующих предпочтительнее
file=fopen(argv[1],"r");
arr=(unsigned int *)malloc(4);
while(!feof(file))
{
++arr_size;
arr=(unsigned int *)realloc(arr,arr_size*sizeof(unsigned int)
fscanf(file,"%u\n",&arr[arr_size-1]);
}
fclose(file);
или это
arr=(unsigned int *)malloc(some_size*sizeof(unsigned int));
file=fopen(argv[1],"r");
arr=(unsigned int *)malloc(4);
while(!feof(file))
{
++arr_size;
fscanf(file,"%u\n",&arr[arr_size-1]);
}
fclose(file);