233k views
2 votes
Declare a typedef struct named jumper_t that will have four parts: character array name that is 16 in length, double array of tries that is N_TRIES in length, double best_jump, double deviation 2. Write one line to declare an array variable, named jlist of the above struct type, with a length of ten. No initialization required.

User LeoSam
by
5.0k points

1 Answer

3 votes

Answer:

The typedef struct is as follows:

typedef struct jumper_t {

char name[16];

double tries[N_TRIES];

double best_jump;

double deviation;

} jumper_t;

The declaration of jlist is:

jumper_t jlist[10];

Step-by-step explanation:

This defines the typedef structure

typedef struct jumper_t {

The following declares the variables as stated in the question

char name[16];

double tries[N_TRIES];

double best_jump;

double deviation;

}

This ends the typedef definition

jumper_t;

(b) The declaration of array jlist is:

jumper_t jlist[10];

User Tomas Brambora
by
4.9k points