Question #236108

What problem may arise with the following functions in a program ? Explain.

int fun();

Int fun(int x=0 ,int y=0);


Expert's answer

Compilation error might occur.

This is because all default arguments must be to rightmost arguments. If a default argument is parsed at the leftmost an error will occur.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS