Question: } reutrn 0; } Question 5: Complete the function body of check in the program below. This function should take two arguments, an integer called

 } reutrn 0; } Question 5: Complete the function body of

}

reutrn 0;

}

Question 5: Complete the function body of check in the program below. This function should take two arguments, an integer called input and an integer pointer called ptr. A calculation to determine whether the input is odd, even or zero must be done within this function. If input is zero, the program should print 0. If input is odd, the program prints - 1. If input is even, the program prints 1. You can assume that the user will only enter a single whole number at each prompt (ie, no text, no floating-point numbers, no empty input, etc) (3 marks) #include void check(int input, int *ptr); int main(void) { int in = 0; int out = 0; while(in != -9999) scanf("%d", &in); check(in, &out)

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