Define stubs for the functions called by the below main0. Each stub should print
ID: 3602646 • Letter: D
Question
Define stubs for the functions called by the below main0. Each stub should print "FIXME: Finish FunctionName0" followed by a newline, and should return -1. Example output: FIXME: Finish GetUserNum() FIXME: Finish GetUserNum) FIXME: Finish ComputeAvg) Avg: -.1 1 #include 3Your solution goes here 4 5 int main(void) 6 int userNum1=0; 7 int userNum2=0; int avgResult = 0: 10 11 12 13 14 15 16 17 18 userNumL = GetUserNum(); userNum2 = GetUserNum(); avgResult = ComputeAvg(userNumL, printf("Avg : %d ", avgResult); return 0; userNum2);Explanation / Answer
Answer:
int GerUserNum() {
printf("FIXME: Finish GerUserNum() ");
return -1;
}
int ComputeAvg(int n1, int n2) {
printf("FIXME: Finish ComputeAvg() ");
return (n1+n2)/2;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.