Question: / / NOTE WRITE CODE IN C PROGRAMMING JUST FOR THE LAST TWO FUNCTIONS. #include #include #include #define SUITS 4 #define FACES 1 3 #define

// NOTE WRITE CODE IN C PROGRAMMING JUST FOR THE LAST TWO FUNCTIONS.
#include
#include
#include
#define SUITS 4
#define FACES 13
#define CARDS 52
#define HAND_SIZE 5
#define HANDS_IN_DECK 10
#define NUMBER_OF_HANDS_PLAYED 10000000//Currently set to 10 million
#define NUMB_HAND
void swap(unsigned int* const, unsigned int* const); //swap the two cards pointed to by the 2 pointers
void shuffle(unsigned int wDeck[]); //shuffle deck
intint main(void)
{
// define and initialize deck array
unsigned int deck[CARDS];
// initialize deck with values 0 to CARDS-1
// value /13 caluclates suit # { "Hearts", "Diamonds", "Clubs", "Spades" };
// value %13 calculates face card {Ace,2,3,...10, Jack, Queen, King}
for (size_t card =0; card < CARDS; ++card)
{
deck[card]= card;
}
srand((unsigned int)time(NULL)); // seed random-number generator
// 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" };
unsigned int hand[HAND_SIZE]; // will contain the cards in the hand.
//Define and initialize variables used to count each type of hand
unsigned int pairCount =0;
unsigned int teoPairCount =0;
}
// Swap the two unsigned ints pointed to by the pointers card1 and card2
void swap(unsigned int* const card1, unsigned int* const card2)
{
// Student implements this function
}
// Shuffle cards in deck
// Must invoke swap() function above
void shuffle(unsigned int wDeck[])
{
// Student implements this function
}

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!