Question: Array and Struct in Card applications: In card game design, card suit and face values can be defined with enumeration values. Declare suit values -
Array and Struct in Card applications:
In card game design, card suit and face values can be defined with enumeration values. Declare suit values - hearts, clubs, diamonds, spades using enum, declare face values of 2 10, Jack, Queen, King, Ace using enum
Declare a structure called Card, and it includes two data members, whose data types are the above two defined enumerations suit and face
typedef an array called Deck, and it includes all 52 cards, whose data type is the above defined Card structure
Write a function that fills a single card with user input from keyboard, using the above declared data structure, and one of parameters must be Card
Write a function that fills all 52 cards in a deck, using the above declared data structure, and one of parameters must be Deck
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
