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
Get step-by-step solutions from verified subject matter experts
