Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
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) Question 1 is about structures
Question 2 is about structures as a function parameter
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started