num=5; double arrry1[5]={1,2,3,4,5}; double *array; array = (double*)malloc(sizeof(double)*num); for (i = 0; i < num; i++) array[i]=arrry1[i];