[Solved] address of operator and pointer operator [closed]


Passing an int by pointer:

void fun (int* p) ;

void fun (int* p)
{
    *p += 1 ; // Add 1 to the value pointed by p.
}

Passing an int by reference:

void fun (int& p) ;

void fun (int& p)
{
    p += 1 ; // Add 1 to p.
}

3

solved address of operator and pointer operator [closed]