Question: How would I call this function in main? Im mostly trying to figure out what goes in for *returnSize int* sortedSquares(int* A, int ASize, int

How would I call this function in main? Im mostly trying to figure out what goes in for *returnSize

int* sortedSquares(int* A, int ASize, int *returnSize) { int* ans = calloc(ASize, sizeof(int)); *returnSize = ASize; int i = 0, j = ASize - 1, index = ASize - 1; while(i <= j) { if(-A[i] > A[j]) { ans[index--] = A[i] * A[i]; i++; } else { ans[index--] = A[j] * A[j]; j--; } } return ans; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!