+ 1
Unreturned Returning- đ€read the code ;
The program will return the unreturned value after Condition. it's in c/c++; i m just giving you a pseudo code. int main() { int t; scan t; print (process (t)); //process definition below return 0; } int process(int param) { if (param>0) return 4; /*otherwise nothing!!, but it is returning Param ,i dont know why!!*/ }
1 Answer
+ 1
i got my answer ,
I read the assembly code of that program.
it gives me architecture of C compilation.
the param is stored in Accumulator.
and after returning control to calling function,
the calling function fetch tha value at Accumulator register.Which is param
if we perform some operations then it will return uts result.
eg
{
if(param>0)
return 4;
param+=78;
}
will return value,if none of condition is satisfied,
param+78.
I hope you people got the logic.