How to program in C the set theory like union,intersection,symmetric difference, cartesian product,power set in a function form?