Given the function declaration (prototype), does the compiler complain or compile if you call this using the following line? If the compiler complains, what is the complaint?
```
//if score >= min_to_pass, returns 'P' for passing,
//else returns 'F' for failing.
char grade (int score, int min_to_pass);
int main()
{
double fscore;
char fgrade;
int need_to_pass;
//omitted code to get values for variables
//fscore and need
fgrade = grade(fscore, need);
return 0;
}
```
The compiler complains about using a double for a parameter for a function calling for an int parameter. The reason is the C++ strong type checking. There is a possible loss of information when a double is sent to any kind of integer (char, int, long) parameter, or assigned to an integer. Warning messages from the Gnu g++ compiler are:
Line 14: warning: float or double used for argument 1
double grade(int, int);
You might also like to view...
Which layout manager is the default for JFrame?
a. FlowLayout b. BorderLayout c. GridLayout d. None of the above
Legend is an option in the ________ button, located by default to the right of a selected chart
A) Chart Styles B) Chart Elements C) Chart Filter D) Chart Layout
A(n) ____________________ is a security management system that compiles information from a computer network or individual computer and then analyzes it to identify security vulnerabilities and attacks.
Fill in the blank(s) with the appropriate word(s).
Which of the following is not a test of access controls?
A. biometric controls B. encryption controls C. backup controls D. inference controls