Question
Which of the following functions is most appropriate for a function that prints a persons height in cm given feet and inches? Select one: a.
Which of the following functions is most appropriate for a function that prints a persons height in cm given feet and inches?
Select one:
a. void PrintCm(int feet, int inches, int &cm)
b. void PrintCm(int &cm)
c. void PrintCm(int feet, int inches)
d. int PrintCm(int feet, int inches)
How many characters will the following char array contain after the line of code:
char hometown[] = "San Diego";
Select one:
a. Depends on the computer.
b. 8
c. 9
d. 10
The function PrintVals is an example of a function prototype:
void PrintVals(int v1, int v2);
int main() {
PrintVals(5, 7);
return 0;
}
Select one:
a. True
b. False
Which type of loop will generates a compilation error when inside a function?
Select one:
a. while loop
b. for loop
c. do-while loop
d. None of the above
Which function is called in the following code?
double CalcFt(double inches) {
return inches * 12.0;
}
int CalcFt(int inches) {
return inches * 12;
}
int main() {
int inches = 24;
cout << CalcFt(24);
return 0;
}
Select one:
a. double CalcFt(double inches)
b. int CalcFt(int inches)
c. Both functions are called.
d. Error: Cannot given same name to multiple functions.
To what value does the function evaluate? Using 1 for true, 0 for false. Assume str is
"Testing 1 2 3...".
isdigit(str[8])
Select one:
a. 1
b. 0
c. '1'
d. 'g'
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started