Question: The function 1s_odd () takes 1 parameters type of double returns a 1 if the number is odd and if the number is even. The

 The function 1s_odd () takes 1 parameters type of double returns

The function 1s_odd () takes 1 parameters type of double returns a 1 if the number is odd and if the number is even. The function print_is_odd () prints out "Number is ODD" if the input parameter is 1, and "Number is EVEN" if the input parameter is 0. However, the code produces the wrong output when executed as shown in the figure below. Rewrite the single line of code that will fix this bug. mainc 1 #include 2 3 int is odd (int n); 4 void print_is_odd(int flag); 5. int main() 6 7 int number = 89; 8 print_is_odd(is_odd(number)); 9 10 return; 11 } 12 13. int is_odd(int n){ 14 - if (n/2 == 0){ 15 return 1; 16 - } else { 17 return 0; 18 } 19} 20 21. void print_is_odd(int flag){ 22 - if(flag == 1){ printf("Number is ODD"); 24 - } else { 25 printf("Number is EVEN"); 26 } 27 } 23 input Number is EVEN ... Program finished with exit code o Press ENTER to exit console

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!