Answers for "call by reference c++ and call by value"

C++
1

calling by reference c++

void fun2(int& a) 
{
    a = 5;
}

int main()
{
    int b = 10;
    fun2(b); 

    // now b = 5;
    return 0;
}
Posted by: Guest on April-22-2020

Code answers related to "call by reference c++ and call by value"

Browse Popular Code Answers by Language