Quiz Answer Key and Fun Facts
1. Which of the following operators has the highest precedence?
2. Which of the following is an INVALID identifier?
3. If x = 13 and y = 5, then which of the following expressions produce a false result?
4. Which of the following data types produces an output of true/false ?
5. If PrintStars is a void function that takes an int expression as a parameter, which of the following is an INCORRECT statement?(Assume all variables are int variables.)
6. What is a function declaration without a body called?
7. A parameter that receives a copy of an argument is called a_____.
Which answer correctly completes this statement?
8. What is a parameter that receives the location of an argument called?
9. What is wrong with the following if statement? (Assume the variable flower is a string and remember this is C++, not C)
if(flower = "Daisy")
else
10. What is wrong with the following count-controlled loop?
int loopCount;
loopCount = 1;
int sum;
sum = 0;
while(loopCount != 10)
{
sum = sum + loopcount;
}
Source: Author
yency
This quiz was reviewed by FunTrivia editor
crisw before going online.
Any errors found in FunTrivia content are routinely corrected through our feedback system.