Question 1058173
The program to do 3 choices per question, with 10 questions, is below.   Unlike the 2 choice version, this version uses an array to hold the current answer key and after printing the current key, it increments the first answer, if that goes past the 3rd choice, it resets that value back to 0 and carries over the change to the next entry (and so on until it reaches an entry that doesn't carry).  In this way the array will walk across all possible answer keys.  

………………………………………………. cut ……………………………………………...

#include stdio.h    // surround stidio.h with less than, greater than
#include math.h   // surround math.h with less than, greater than 


int main(int argc, char **argv) 
{
  int i,j,k, key[10];
  int n_max;

  // Zero out the ans key, key[k]=0,1,2 ==> A,B,C respectively
  for(k=0; k<10; k++) {
    key[k] = 0;
  } 

  n_max = (int)pow(3, 10);
 // Next line is "for i equals 0 semicolon i less than n max semicolon i plus plus"
  for(i=0; i<n_max; i++)  {
 
   // Print ans sheet corresponding to key[]
    printf("Ans sheet %d\n", i+1);
    for(j=0; j<10; j++) {
      printf("%2d. %c\n", j+1, key[j]+'A');
    }
 
    // Generate next ans key
    for(k=0; k<10; k++) {
      key[k]++;
      if (key[k] > 2) {
        key[k] = 0; 
      }
      else {
        // Exit loop once we have no more carries
        break; 
      }
    }
  }


  return 0;    
}