Link to home
Start Free TrialLog in
Avatar of anemos
anemos

asked on

returning array in c

How can you set a function that returns an array type?
I tried for example : int[ ] check( int [ ] ) { .... }
but it doesn't work..
Can I get around it with using typedef?
Is there a way of getting around it without using typedef?

 thank you,
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
You can return a pointer to an array (or to the first element of the array)
You can also return a structure containg an array.