Interview Question
Country: United States
I think its about specifying optional arguments in a function (in C++).
The way function divide has been defined, it causes specifying the other argument b optional. That means you can call divide function in any of following 2 ways:
divide(10) //in this case other variable will be assumed to be 2
divide(10,5) //in this case other variable will be 5. b=2 will be ignored.
Where are the answers?
- Anonymous April 22, 2014