int main()
{
int b, num;
int *array;
b=func(&array, &num);
for (b=0; b<=num; b++)
{
printf("%d\n", array[b]);
}
return 0;
}
int func (int **array, int *num)
{
int i;
I want a function in c than can return more than one integer values in array passed as argument.
From main function i m calling a function (say foo)with array as argument. I want foo to return set of values in array which was passed as arg. foo should allocate memory for each array element.
Leave a comment: