Question: Question about programming in C: Question 1 is about structures Question 2 is about structures as a function parameter 1a. Declare/Create a structure/class called Card.

Question about programming in C:
Question 1 is about structures
Question 2 is about structures as a function parameter
 Question about programming in C: Question 1 is about structures Question
2 is about structures as a function parameter 1a. Declare/Create a structure/class

1a. Declare/Create a structure/class called Card. Declare two variables in it: One a string (char*) called face', and the other another string called 'suit'. 1b. From the main) function, if I Instantiated/Declare a variable/object of the struct/class Card as: struct Card firstCard; Instantiated/Declare a variable/object called 'secondCard' of the struct/class Card. 1c. If I initialize (assign a value) the 'face' variable of 'firstCard' with Jack' as: firstCard.face "Jack" Initialize your 'face' variable of the secondCard variable/object as 'Queen. 1d If I initialize the 'suit' variable of 'firstCard' variable/object with 'Hearts' as: firstCard.suit- "Hearts" Initialize your 'suit' variable of the secondCard variable/object with 'Spades'. le. Print 'Jack of Hearts' ('Jack and 'Hearts' from the initialized variables above). Print 'Queen of Spades' ('Queen and 'Spades' from the initialized variables above). Print 'Jack of Spades' ('Jack and 'Spades' from the initialized variables above). Print "Queen of Hearts'('Queen' and 'Hearts' from the initialized variables above)

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!