Important: Please see this very much related question: Return multiple values in C++.
I\'m after how to do the same thing in ANSI C? Would you use a
You have described the two possible solutions and your perceived performance constraint. Where you go from here is really up to you - we don't have enough information to make an informed judgement.