Question: In C code: struct PLAYER { char userName[16]; char active; //One of 'n' (novice), 'a' (active) 'm' (moderator) or 'R' (retired) double level; // A

In C code:

struct PLAYER { char userName[16]; char active; //One of 'n' (novice), 'a' (active) 'm' (moderator) or 'R' (retired) double level; // A value from 0.0 to 5.0 unisgned short rating; //A value fo

};

Write a function that is passed a player name and an empty struct PLAYER, and then fills the userName field with the passed player name and randomly generates values for the other fields. The data structure should be returned to the calling function.

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!