Question: C language not C++ 1. Write the statements to do the following: (2 pts) a. Define a struct with member variables width, height, topleft x,

C language not C++ C language not C++ 1. Write the statements to do the following:(2 pts) a. Define a struct with member variables width, height, topleftx, topleft y all floats). Use a tag to call it Rectangle.b. Declare a variable struct type Rectangle 2. Consider the following variables:

1. Write the statements to do the following: (2 pts) a. Define a struct with member variables width, height, topleft x, topleft y all floats). Use a tag to call it Rectangle. b. Declare a variable struct type Rectangle 2. Consider the following variables: struct int x; float y; char zi var1; union nt x; float y; char[20] z;) var2 f float and int are stored using 4 bytes each, what is the size (in bytes) for var1? What is the size of var2? (2 pts) 3. Consider the following code struct Triangle float side 1; float side2 float side3 t1, t2; num Boolean (FALSE, TRUE enum Boolean isEquilateral(struct Triangle triangle); a. Implement the function isEquilateral which returns enum value TRUE if the given triangle is equilateral and enum value FALSE otherwise. (2 pts) b. Assign values of your choice to member variables of t1 (1.5 pts c. Call the function isEquilateral on triangle t1 and capture the returned value in variable result. (1 pt) d. Copy the content from t1 to t2 without having to individually copy each member. (1 pt)

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!