```
int* getRow(int rowIndex, int* returnSize) {
int i, j;
int *result;
*returnSize = rowIndex+1;
result = (int *)malloc(sizeof(int) * (*returnSize));
for(i=0; i<(*returnSize); i++) {
*(result+i) = 1;
for(j=i-1; j>=1; j--) {
*(result+j) += *(result+j-1);
}
}
return result;
}
```