Skip to main content
Contents Index
Search Book
Search Results:
No results.
Readability settings Prev Up Next
\(\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 12.4 Practice: Multiple Functions
Check Your Understanding Check Your Understanding
1.
What are some of the advantages of using functions (choose all that apply)?
2.
Given the following function definition, which is the correct function call, given that a variable
a of type
int has been declared?
int myaddition(int x, int y)
{
return(x+y);
}
Feel free to use the window below to try out some code. Be sure to work the correct answer out "by hand" first before verifying your answer using the code window.
admin ..... open in new window
a = myaddition(3,5);
Correct
a = myaddition(3,5)
Not quite. Try again!
int a = myaddition(3,5)
Not quite. Try again!
a = myaddition(3.0,5.0);
Not quite. Try again!