Answer to Question #236108 in C++ for SOM

Question #236108

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

int fun();

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


1
Expert's answer
2021-09-15T17:26:05-0400

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS