The Most Active and Friendliest
Affiliate Marketing Community Online!

“Propeller”/  Direct Affiliate

C Programming: Can I return an array (from a function)?

randycrosby2017

New Member
affiliate
Can an array be a return value from a function?

eg. char function (void) { /* some codes */ return aArrary[10] = { /*some values */ }?
 
While my C is pretty rusty, I think you would use a pointer to the array & pass that as an INT.

Though I would ask, if you are not passing anything into the function, what action are you taking that you end up with values to return?
 
banners
Back