bool* prefixesDivBy5(int* A, int ASize, int* returnSize){ bool* answer=(bool*)malloc(ASize*sizeof(bool)); int unitSum=0, i; for(i=0; i<ASize; i++){ unitSum= (unitSum*2+A[i])%10; answer[i]=(unitSum == 0 || unitSum == 5)?true :false; } *returnSize=ASize; return answer; }