0
Function
Why if you put b = 9; F(B); cout < b; in the function Void f(int a) {a = 7;}, then B will be = 9, and not 7
2 Réponses
+ 1
Колоб Масло your function parameter is bring passed by value. The parameter, a, gets assigned the value and any change to it remains local to the function.
If you want the function to change the variable, b, then use pass by reference, &a.
void f(int &a) {...}
0
give us the complete code... I dont understand...
https://sololearn.com/compiler-playground/Wek0V1MyIR2r/?ref=app