The function to reduce each element of the array to the value of the first element. At the entrance of the array and its length. It works only for the first element.
void romdomdom(double * firstel,int * otrlen){ double *rovn=firstel; for(int i=0;i<*otrlen;i++){ *(firstel+i)=*(firstel+i)-*rovn; } } Everything works if done so with the creation of a variable
void romdomdom(double * firstel,int * otrlen){ double rovn=*firstel; for(int i=0;i<*otrlen;i++){ *(firstel+i)=*(firstel+i)-rovn; } } It is not clear why the first option does not work only through pointers.