Question: Take the program shown in the table below (from Deitel&Deitel textbook Fig_7_24) that creates a deck of cards, shuffles them, and then lists them

![// shuffle cards in deck void shuffle( unsigned int wDeck[][ FACES ] ) { size_t row; // row number size_t](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2022/03/62429f82d3c5a_37862429f825dbb7.jpg)
Take the program shown in the table below (from Deitel&Deitel textbook Fig_7_24) that creates a deck of cards, shuffles them, and then lists them out. Modify the program to "deal" two hands of cards for two players. Each player will be dealt 5 cards. Deal one to the first player, then one to second player. Repeat until both players have five cards in their hand. Then, compute the total points in each player's hand and determine the winner with the most points. If a player has an ace, then count that as 11 points. Print out the winning player's total points and then his cards. Also, print out the losing player total points and his cards. Make sure the last line in your screenshot shows the current date (you must include in your main function the line: printf("Printed on %s", ctime (&rawtime)); ) Turn in: 1. Your code inside of a table that says "Source Code" 2. Two screenshots of your output with different hands for each player. // Fig. 7.24: fig07_24.c // Card shuffling and dealing. #include #include #include #define SUITS 4 #define FACES 13 #define CARDS 52 // prototypes void shuffle ( unsigned int wDeck [] [ FACES ] ); // shuffling modifies wDeck void deal unsigned int wDeck [] [ FACES ], const char *wFace[], const char *wSuit[] ); // dealing doesn't modify the arrays int main(void) { // initialize suit array const char *suit [ SUITS] = { "Hearts", "Diamonds", "Clubs", "Spades" }; // initialize face array const char *face[ FACES] = {"Ace", "Deuce", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King" }; // initialize deck array unsigned int deck[ SUITS ][ FACES ] = {0}; srand(time(NULL)); // seed random-number generator shuffle( deck ); // shuffle the deck deal( deck, face, suit ); // deal the deck } // end main // shuffle cards in deck void shuffle( unsigned int wDeck[][ FACES ] ) { size_t row; // row number size_t column; // column number size_t card; // counter // for each of the cards, choose slot of deck randomly for ( card = 1; card
Step by Step Solution
There are 3 Steps involved in it
It appears that you have shared a programming assignment that involves modifying an existing program for card shuffling and dealing from the Deitel De... View full answer
Get step-by-step solutions from verified subject matter experts
