Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Make a proper function call using only the variables defined below as arguments.

ID: 3749996 • Letter: M

Question

Make a proper function call using only the variables defined below as arguments. Note that you may need to modify the variables with the operators used in processing pointers, but you must use one of the 3 variables listed below. Also note that you should not try to guess at the implementation of the functions, all you are doing is calling the function properly.
int i=6;
double *doub = new double;
char* exclaim="I've got game!";

a) void yourGame(char );


b) void myScore(double *, int);



c) void myGoodness(char *);



d) void earlyTime(int);



e) void lateTime(int*, char*, double, double* );



f) void e(double);

Explanation / Answer

//given variables
int i=6;
double *doub = new double;
char* exclaim="I've got game!";
a)void yourGame(char );
Answer: here for th function -- yourGame -- the input argument must be char so
function call is
yourGame(exclaim[0]);//passing first char of exclaim which is --- I
b) void myScore(double *, int);
Answer: input arguments types are : double* and int (so we need to pass varibles of these types only)
function call:
myScore(doub,i);

c) void myGoodness(char *);
Answer: input argument type is char *
function call :
myGoodness(exclaim);


d) void earlyTime(int);
Answer: input argument type is int
function call:
earlyTime(i);


e) void lateTime(int*, char*, double, double* );

Answer: input arguments types: int *(pointer to int), char*, double, double* (pointer to double)
function call :
lateTime(&i,exclaim,*doub,doub);//since i is of type -- passing its address
f) void e(double);
Answer: input argument type : double
function call:
e(*doub);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote