Sir, where am i doing mistake

why not my count variable is updating. code–> https://ide.codingblocks.com/s/459142

because you didn’t pass the count " by reference "
after that it will update count

sir, what is the need of passing " by refrence ". why is not updating by passing through " value " ?

you have to pass the count by reference
because if you pass it by value function make a local copy and all the changes occur on local copy and don’t reflect to main()

okay sir, i got it. thank you

plz mark the doubt as resolved from your side

ohkay sir, i have done it

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.