User Profile

Collapse

Profile Sidebar

Collapse
Kirankher
Kirankher
Last Activity: Sep 23 '10, 10:20 AM
Joined: Sep 22 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hi all,

    Thanks for your help. I got what i wanted.

    Below is a snippet:

    Code:
    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;
    ...
    See more | Go to post

    Leave a comment:


  • Kirankher
    started a topic How to get more than one value from function in c
    in C

    How to get more than one value from function in c

    Hi,

    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.

    please help me.

    Kiran.
    See more | Go to post
No activity results to display
Show More
Working...