bool* kidsWithCandies(int* candies, int candiesSize, int extraCandies, int* returnSize){ int max=0,i; bool* arr = (bool*)malloc(candiesSize); for (i=0; i<candiesSize; i++) { if (candies[i]>max) max=candies[i]; } for (i=0; i<candiesSize; i++) { arr[i] = (candies[i] + extraCandies >= max)? true : false; } *returnSize=candiesSize; return arr; }