Have the enumerators to have integer values that match the card values with ace as high. - C Data Type

C examples for Data Type:enum

Description

Have the enumerators to have integer values that match the card values with ace as high.

Demo Code

#include <stdio.h> 
int main(void) { 

  enum FaceValue { two=2, three, four, five, six, seven,
                 eight, nine, ten, jack, queen, king, ace};  

  enum FaceValue today = three;
    /* w  ww  .j a  v a2 s  .c  om*/
  printf("%d\n",today);

  return 0; 
}

Result


Related Tutorials