title: returning 2 values , wrong output
body: <pre><code>int* twoSum(int* nums, int numsSize, int target, int* returnSize){
  int res [2] ;
   for (int i =0 ; i &lt; numsSize ; i++){
     for (int j =0 ; j &lt; numsSize ; j++){
          
        if (*(nums+i)+*(nums+j) == target ){
            res[0] = i ;
            res[1] = j ;
        }
     }
   };
  //printf(&quot;[%d,%d]&quot;, res[0],res[1]);
  return res;
  </code></pre>
  <p>}</p>
  <p>This is the two sum problem . I am not getting the output correct . Can someone explain where I did wrong?</p>