Question
Each of the following functions has errors. Locate as many errors as you can.void area(int length = 30, int width){return length * width;}
Step 1
In C++, when using default parameters, all parameters to the right of a parameter with a default value must also have default values. In this function, `length` has a default value, but `width` does not. This is an error. Show more…
Show all steps
Your feedback will help us improve your experience
Watch the video solution with this free unlock.
EMAIL
PASSWORD