What's the answer

#include<stdio.h>
void fun (int, int);
int main()
{
int i = 5, j = 2;
fun (i, j);
printf (“%d %d\n”, i, j);
return 0;
}
void fun (int i, int j)
{
i = i * i;
j = j * j;
}

1 Like

5 2

why not 25 and 4 please elaborate

Because we are calling the function in call by value so whatever the change is done in the function will only for function only so in main we will have 5 2

Due to call by value function called answer is 5 2

Because it is PASS BY VALUE for the function defined, which means the values passed to function as argument are copy of original and so if u change it inside function, it do not reflect or change the original one (main).