Question
Define a structure with the tag Xxx to consist of an integer (aa), and a double (bb). Then in the main function, declare mm to
Define a structure with the tag Xxx to consist of an integer (aa), and a double (bb). Then in the main function, declare mm to be a variable of type struct Xxx, and pp to be a pointer variable of type struct Xxx.
Then, use the dot operator (.) to assign the following values to the members of the structure variable mm as per the following Table:
variable name | member name | value |
mm | aa | 8 |
bb | 23.2 |
Now, remember that pp and mm are related as pp = &mm. Use the pointer variable pp to assign the following values to the members of the structure variable pp, which are aa and bb as per the following Table:
variable name | member name | value |
pp | aa | 12 |
bb | 97.2 |
Finally, use the printf(.) statement to print out all these four numerical values using the dot operator (.) applied between variables and its members.
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