Question: Write a program that will create a deck of cards, initialize values and properties for cards, shuffle, and print out the deck. Make sure the

Write a program that will create a deck of cards, initialize values and properties for cards, shuffle, and print out the deck. Make sure the last line in your screen shot shows the date for review. See line 53 below. #include  #include  #include  #define NCARDS 52 #define NPROPS 2 #define NSUITS 4 #define NFACES 13 // card text values using array of pointers to preinitialized constant text strings char* suit[NSUITS]={"hearts","spades","clubs","diamonds"}; char* face[NFACES]={"ace","two","three","four","five","six","seven","eight","nine", "ten","jack","queen","king"}; // function prototypes used for manipulating cards void PrintCard(int deck[NCARDS][NPROPS], int i); void InitDeck(int deck[NCARDS][NPROPS]); void SwapCards(int deck[NCARDS][NPROPS], int src, int dest); void ShuffleDeck(int deck[NCARDS][NPROPS]); int GetPlayValue(int deck[NCARDS][NPROPS], int i); int main() { //deck of cards // face, suite, card value int deck[NCARDS][NPROPS]; time_t rawtime=time(NULL); int i; srand(time(NULL)); // init the deck // loop on the chards InitDeck(deck); ShuffleDeck(deck); // print the deck puts("The shuffled deck is:"); for (i=0; i                                            

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!