title: C : load of null pointer of type 'int' (__Serializer__.c), Error in my code
body: <p>My code for the above problem received the following runtime error
  "Line 207: Char 3: runtime error: load of null pointer of type 'int' (<strong>Serializer</strong>.c)"
  Any suggestions on what I am doing wrong.
  My code:</p>
  
  <pre><code>int* twoSum(int* nums, int numsSize, int target, int* returnSize)
  {
      int x=0,i,j;
      returnSize = (int*)malloc(2 * sizeof(int));
      for (i=0; i&lt;numsSize; i++)
          {
          x = nums[i];
              for (j=i+1; j&lt;numsSize; j++)
              {
               if (nums[j] == target-x)
                  {   
                      returnSize[0] = i;
                      returnSize[1] = j;
                      break;
                  }
              }
          }
     return *returnSize;
  }
  </code></pre>