Question: Please help me to fix this C language program, It can not compile. The final answer should be print 12 in the result. Code: #include

Please help me to fix this C language program, It can not compile. The final answer should be print 12 in the result.

Please help me to fix this C language program, It can not

Code:

#include #include int bar (int b) { int i; i=b+b; return(i); }

int foo(int a, int b){ if(a==b){ a=0; return(a); }else{ int x=a; int y=b; y=y-x; x=y; int c=x; int d; d=bar(x);

y=a+2; int e=foo(y,b); e=e+d; return (e); } } int main(){ int a=0; int b=4; int c =foo(a,b); printf("c: %d ",c); return (0); }

include 1 2 #incLude 4 int bar (int b) int i; i-b+b; return(i); 10 11 int foo(int a, int b)t 12 13 14 15 16 17 18 19 20 21 if (a-b){ return (a); elset int x=a ; int y b int c-x; int d; d-bar(x); 23 24 25 26 27 28 29 30 31 int main() 5 32 y-a+2; int e-foo(y,b); e e+d; return (e); 34 35 36 37 38 int a-0; int b 4; int c =foo(a, b) ; printf("C: %d ",c); 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 Databases Questions!