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

You are asked to write the computer functions with the following function declar

ID: 3774281 • Letter: Y

Question

You are asked to write the computer functions with the following function declarations in C. For each determine if it is possible. If so, a) give the formal description of the mathematical function represented , b) determine if it is onto, and c) determine if it is one-to-one.

(a) double findLength(double x, double y, double z);

Purpose: given the coordinates of a vector, (x, y, z), the function returns the length of the vector using sqrt(x^2 + y^2 + z^2) .

(b) void findVector(double length, double *x, double *y, double *z);

Purpose: given the length of a vector, the function uses pointers to “return” the coordinates of the specific vector that had this length.

You are not being asked to provide code.

Explanation / Answer

double findLength(double x, double y, double z){

return sqrt(x^2 + y^2 + z^2);

}

void findVector(double length, double *x, double *y, double *z)

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