title: Creating all possible k combinations of n items in C++
body: <p>There are n people numbered from <code>1</code> to <code>n</code>. I have to write a code which produces and print all different combinations of <code>k</code> people from these <code>n</code>. Please explain the algorithm used for that. </p>