问题
代码
/**
* Note: The returned array must be malloced, assume caller calls free().
*/
int* findNumbersWithSum(int* nums, int numsSize, int target) {
int i,j,n=0;
int *A = (int*)malloc(sizeof(int*)*2);
for(i=0;i<numsSize-1;i++){
for(j=i+1;j<numsSize;j++){
if(nums[i] + nums[j] == target){
A[0] = nums[i];A[1]=nums[j];
return A;
}
}
}
}