as reference? that's as pointer.

Thanks,
Tyler Littlefield
Web: tysdomain.com
email: [email protected]
My programs don't have bugs, they're called randomly added features.

  ----- Original Message ----- 
  From: Allison Vollmann 
  To: [email protected] 
  Sent: Thursday, April 02, 2009 8:09 AM
  Subject: Re: [c-prog] returning arrays


  pass the array as reference in the function.

  void chArray(int *array)
  {
  array[0] = 4;
  }

  int main(void)
  {
  int arr[] = {1,2,3};
  ...
  chArray(&arr[0]);
  ...
  return 0;
  }

  Em 2/4/2009 10:41, rsashwinkumar escreveu:
  >
  > this may be very basic but plz., help
  >
  > How to pass an array(1 Dimensional) to a function, multiply its 
  > elements by 2 and return to main function and assign to another array...
  >
  > Plz., help urgent...
  >
  > 



  

[Non-text portions of this message have been removed]

Reply via email to