Question: in c language. Define a function SetHeight, with int parameters feetVal and inchesVal, that returns a struct of type LengthFtIn. The function should assign LengthFtIn's

in c language. Define a function SetHeight, with int parameters feetVal and inchesVal, that returns a struct of type LengthFtIn. The function should assign LengthFtIn's data member numFeet with feetVal and numInches with inchesVal. #include
typedef struct LengthFtIn_struct {
int numFeet;
int numInches;
} LengthFtIn;
/* Your code goes here */
L
int main(void){
LengthFtIn objectSize;
int feetVal;
int inchesVal;
scanf("%d", &feetVal);
scanf("%d", &inchesVal);
objectSize = SetHeight(feetVal, inchesVal);
printf("Size: %dft %din.
", objectSize.numFeet, objectSize.numInches);
return 0;
}

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 Programming Questions!