In clearBit function why isn’t the address passed in main function? since the argument is clearBit(int &n,int i), so why is clearBit(n,i) passed and not &n??
Why wasn't reference passes?
@mehulbhandari358 you need to add & only in the function definition, not while calling the function.
also we need to add *n in the function to use the value .
as we have sent the reference.
@mehulbhandari358 you are confused between C syntax and C++ syntax for passing arguments by reference.