int* printNumbers(int n, int* returnSize){ if (n == 0) return NULL; *returnSize = pow(10,n) - 1; int* arr = (int*)calloc(*returnSize,sizeof(int)); for (int i=0; i<*returnSize; i++) arr[i] = i+1; return arr; }