title: generate all subsets of size k from a set
body: <p>I want to generate all the subsets of size k from a set.</p>
  
  <p>eg:-say I have a set of 6 elements, I have to list all the subsets in which the cardinality of elements is 3.</p>
  
  <p>I tried looking for solution,but those are code snippets.
  Its been long since I have done coding,so I find it hard to understand the code and construct a executable program around it.</p>
  
  <p>A complete executable program in C or C++ will be quite helpful.
  Hoping of an optimal solution using recursion.</p>