1. | How do you prototype a function? | |
2. | What are parameters? | |
3. | What are the four rules for writing a function? | |
4. | How many parameters may a function have? | |
5. | What is another word for the parameters of a function? | |
6. | What is function overloading? | |
7. | What is one purpose of header files? | |
8. | What extension do header files end in? | |
9. | Can an overloaded function have the same number of parameters? | |
10. | What is passing by reference? | |
Answers
1. | Simply place its declaration line at the beginning of your code just after the include statements, and follow it with a semicolon. |
2. | Data that you pass to the function when you call it |
3. | The function must have a return type. It may be void if the function returns nothing. The function must have a valid name. The function must have parentheses for a list of parameters past to it, even if the parentheses are empty. The function must either be written before it’s called, or it must be prototyped. |
4. | None, one, or many |
5. | Arguments |
6. | Having more than one function with the same name but different types or a different number of parameters. |
7. | Storing function prototypes |
8. | .h |
9. | Yes, if they are of different types. |
10. | This is when you pass an address of a variable to a function, rather than the value contained by that variable. |