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

CHALLENGE CHA28.2.1: Structs and functions Reset Define a function SetHeight, wi

ID: 3701136 • Letter: C

Question

CHALLENGE CHA28.2.1: Structs and functions Reset Define a function SetHeight, with int parameters feetVal and inchesVal, that returns a struct of type HeightFtin. The function should assign HeightFtln's data member feet with feetVal and inches with inchesVal 1 #include 3 typedef struct HeightFtIn_struct 4 int feet; int inches; 6 HeightFtIn; 8Your solution goes here/ 10 int main(void) f 12 13 HeightFtIn studentHeight int feet; int inches; scanf("%d %d", &feet;, &inches;); studentHeight - SetHeight(feet, inches); printf("The student is %d feet and %d Inches 15 16 17 18 19 20 21 tall. ", studentheight . feet, studentheight. inches); return 0; Check Next

Explanation / Answer

HeightFtIn SetHeight(int feetVal, int inchesval) { HeightFtIn h; h.feet = feetVal; h.inches = inchesval; return h; }