title: Card shuffling dealing program
body: <p>I'm getting the following errors when I compile my C program. I'm just a beginner so I appreciate any help here</p>
  <pre><code>main.c: In function ‘print_card’:
  main.c:53:12: error: ‘face’ undeclared (first use in this function)
       printf(face[n % 13] + &quot; of &quot; + suit[n / 13]);
              ^~~~
  main.c:53:12: note: each undeclared identifier is reported only once for each function it appears in
  main.c:53:36: error: ‘suit’ undeclared (first use in this function)
       printf(face[n % 13] + &quot; of &quot; + suit[n / 13]);
                                      ^~~~
  </code></pre>
  <p>I need to output something similar to this:
  king of Diamonds
  Nine of Clubs</p>
  <p><strong>Any suggestions (I'm a beginner) I may have done something wrong. Here is my code</strong></p>
  <pre><code>
  /* Card shuffling dealing program */
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  
  /* prototypes */
  
  
  void shuffleAndDeal( int workdeck[][ 13 ], const char *workface[],const char *worksuit[] );
  void print_card(int n);
  
  int main( int argc, char *argv[] ) {
  /* initialize suit array */
   const char *suit[ 4 ] = { &quot;Hearts&quot;, &quot;Diamonds&quot;, &quot;Clubs&quot;, &quot;Spades&quot; };
  
   /* initialize face array */
   const char *face[ 13 ] =
   { &quot;Ace&quot;, &quot;Deuce&quot;, &quot;Three&quot;, &quot;Four&quot;,
   &quot;Five&quot;, &quot;Six&quot;, &quot;Seven&quot;, &quot;Eight&quot;,
   &quot;Nine&quot;, &quot;Ten&quot;, &quot;Jack&quot;, &quot;Queen&quot;, &quot;King&quot; };
   /* initialize deck array */
   int deck[ 4 ][ 13 ] = { 0 };
   
   srand( time( 0 ) ); /* seed random-number generator */
   shuffleAndDeal( deck, face, suit );
   return 0; /* indicates successful termination */
  } 
  
  
  void shuffleAndDeal( int workdeck[][ 13 ], const char *workface[], const char *worksuit[] ) {
  //  srand((unsigned int)time(NULL));
  
      int deck[52];
  
      // Prime, shuffle, dump
      for (int i=0;i&lt;52;deck[i++]=i);
      random_shuffle(deck, deck+52);
      for_each(deck, deck+52, print_card);
      return;
  }
  
  void print_card(int n) {
      printf(face[n % 13] + &quot; of &quot; + suit[n / 13]);
  }
  
  </code></pre>