If you are passing the address of result then it's definitely a problem because you have not allocated 'result' on the heap. It's a local variable in the function Union and it disappears when we exit the function, if you try to access that address you can get run-time errors.
Agni 370 Practically a Master Poster Featured Poster
Agni 370 Practically a Master Poster Featured Poster
Agni 370 Practically a Master Poster Featured Poster
Nick Evan commented: sounds like good advice to me :) +12
Agni 370 Practically a Master Poster Featured Poster
Agni 370 Practically a Master Poster Featured Poster
homeryansta commented: awesome guy! +1