Question: Dose function declaration and function definition have the same pass by value variable or pass by reference variable ? I need explanation and tracing to
1. \#include iostream> 2. using namespace std; 3. void f1 (int a, int\& b, int\& c ); 4. int main () 5. \{ 6. int x=1,y=3,z=2; 7. f1(x,y,z); 9. return ; 10. } 11. void f1 (int\& a, int\& b, int c ) 12. \{ 13. a=2; 14. b=2; 15. c=2; 16. } 1. x=2,y=6,z=4 2. x=1,y=6,z=4 3. x=1,y=3,z=2 4. x=2,y=3,z=4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
