Question: Question 26 Why is the following function declaration invalid? double calculate_future_value(double monthly_investment, double yearly_interest_rate = 4.5, int years); a. You cant code default values in
Question 26
Why is the following function declaration invalid? double calculate_future_value(double monthly_investment, double yearly_interest_rate = 4.5, int years);
| a. | You cant code default values in function declarations. | |
| b. | If you code a default value for one parameter, you must code them for all parameters. | |
| c. | If you code a default value for one parameter, you must code them for all parameters after that parameter. | |
| d. | If you code a default value for one parameter, you must code them for all parameters before that parameter. |
You should not use a global variable when
| a. | a function defines a local variable with the same name | |
| b. | the global variable is modified by a function | |
| c. | the global variable is defined as a constant | |
| d. | all of the above | |
| e. | a and b only |
Question 28
You typically code an include guard within a header file
| a. | to prevent using directives and declarations from being coded within the file | |
| b. | to prevent constants, variables, and functions from being defined within the file | |
| c. | to prevent the compiler from including the same header file twice | |
| d. | all of the above | |
| e. | a and b only |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
