edited by
749 views
1 votes
1 votes
int f(int &x, int c)
   {
    c = c-1;
    if (c == 0) return 1;
        x = x +1;
    return f(x,c) * x;
   }

 

What is the return value of $f(p,p),$ if the value of $p$ is initialized to $4$ before the call$?$ Note that the first parameter is passed by

reference, whereas the second parameter is passed by value.

edited by

1 Answer

Answer:

Related questions

0 votes
0 votes
1 answer
1
Balaji Jegan asked Nov 15, 2018
1,327 views
Predict the Output for both the snippets for the following:1. Call by Value2. Call by Reference3. Call by Need4. Call by Name5. Call by value Result/Call by value Return(...
0 votes
0 votes
0 answers
2
Rahul_Rathod_ asked Oct 3, 2018
529 views
from below list of parameter passing techniques, which parameter passing technique we can implement in c?1) call by value2) call by refference3) call by value result4) ca...
0 votes
0 votes
0 answers
3
Rishabh Baghel asked Mar 5, 2018
571 views
Does C support all passing parameters techniques like call by text, call by copy restore, and call by name?
0 votes
0 votes
1 answer
4
sushmita asked Mar 27, 2017
535 views
Find the out put of the following C program. main() { char *ptr = "techtud"; char p= (*ptr)++; printf("%s\n",ptr); }the output of the program came as$?$