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...
>
> 

Reply via email to