Consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } } The final value of x is
and for the matter Please chaeck the question again...you can'nt define a function inside another function in C...and in this question the func appears to be defined inside the function main().:)
RE: Consider the following C codemain(){int i=3,x;while(i>0){x=func(i);i--;}int func(int n){static sum=0;sum=sum+n;return(sum);}}The final value of x isA. 6B. 8C. 1D. 3