Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In classes we have discussed how we can design data structure in C to represent different objects such as playing cards. In this quiz, you
In classes we have discussed how we can design data structure in C to represent different objects such as playing cards. In this quiz, you are asked to design the appropriate data structure to represent geometric Circles. Each circle is represented by 3 paramenters: x_coord: an integer representing the x coordinate of the center . y_coord: an integer representing the y coordinate of the center radius: an integer representing the radius of the circle Once the data structure has been designed, please write the code (in your main function) to store the following circles: c1 100, 100,50 c2200, 200, 30 c3 250, 150, 100 Write a function, name ShowCircumferences(), to calculate and print the circumferences (C = 2- Pi Radius) of the three circles. Call this function at the bottom of your main() function and observer the output (This is the "BEFORE" observation) Then add the following lines of code (at the very bottom of your main()) and run again: cl->radius = C3->radius; c2 = cl; ShowCircumferences(); Now observer the new (i.e. "AFTER") output. Explain the why the AFTER is different from the BEFORE, and why it is the way it is
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