Question 1
0 out of 2 points | | | Study the following code snippet: int greater_num(int num1, int num2)
{
if (num1 < 0 || num2 < 0)
{
cout << "Only POSITIVE Numbers!!!"; return 0;
}
else
{
if (num1 <= num2)
{
return num1;
}
else
{
return num2;
}
}
}
Which of the following describes a constraint on the use of this function?Answer | | | | | Selected Answer: | All of the above listed items. | Correct Answer: | The use of cout does not allow this function to be used for a graphics program. | | | | |
Question 2
2 out of 2 points | | | What is helpful when dealing with a complex set of instructions for developing the code?Answer | | | | | Selected Answer: | Performing a manual walkthrough on a piece of paper before the actual code is written. | Correct Answer: | Performing a manual walkthrough on a piece of paper before the actual code is written. | | | | |
Question 3
0 out of 2 points | | | Which of the following is true about functions?Answer | | | | | Selected Answer: | Functions can have multiple parameters and can return multiple return values. | Correct Answer: | Function can have multiple parameters and can return one return value. | | | | |
Question 4
0 out of 2 points | | | Which of the following must be provided when defining a function?Answer | | | | | Selected Answer: | A name for the function, a name for each parameter, and a name for the return value | Correct Answer: | A name for the function, a name and type for each parameter,