Question: Username: Midterm Exam 1 Fall 2 0 1 8 CS 2 4 0 0 0 ( 2 0 points ) Answer the following questions. (

Username:
Midterm Exam 1
Fall 2018
CS 24000
(20 points) Answer the following questions.
(a)(4 points) Declare a structure, resistor_struct, which contains (in this order) an array of ID_LEN
)=(5 characters named id, a float named max_power, and an integer named resistance.
struct resistor_struct
char id[ID-LEN]={%0'};
floot max-power =0.0;
int reskstance =0;
{:[5],[4]}13+3=16
(b)(2 points) Use typedef to declare a new type, resistor_t, of the structure in 2.a.
typedef struct resistor_struct resistort;
(c)(4 points) Declare a structure, circuit_struct, that contains an array of CNAME_LEN (=24) char-
acters named name and an array of 10 resistor_t's, called resistors.
struct circuit-struct
char name[CMMCELEEN]={{?n'};
resistor_t resistors 10;
Given the following: sizeof int
Username: Midterm Exam 1 Fall 2 0 1 8 CS 2 4 0 0

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 Programming Questions!