Bit Manipulation - Get & Sets Bits

At 11:07, Prateek sir says that he is accepting the number n by reference (i.e &n).
I didn’t understand how is passing the number by reference been used here. As far as I know we used pointers to pass by reference but I don’t see any use of pointers here.

hello @yajurkhurana

referene variable diffent type of variable in c++. they are bit differnt from pointers.
pls read this for clarity-> link

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.