edited by
1,524 views
1 1 vote
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.

1 Answer

Answer:
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.8k
1.8k views
Balaji Jegan asked Nov 15, 2018
1,764 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 0 votes
0 0 answers
875
875 views
Rahul_Rathod_ asked Oct 3, 2018
875 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 0 votes
0 0 answers
913
913 views
Rishabh Baghel asked Mar 5, 2018
913 views
Does C support all passing parameters techniques like call by text, call by copy restore, and call by name?
0 0 votes
1 1 answer
1.4k
1.4k views
Arun Rout asked Jan 7, 2019
1,380 views
#include<stdio.h>int fun(int arr[]){ arr=arr+1; printf("%d",arr[0]);}int main(void){ int arr ={10,20}; fun(arr); printf("%d",arr[0]); return 0;}A.COMPIL...