You are on page 1of 10

Fundamentals of Computing 2

Long Quiz
Given the following function declaration:

1. What is the name of the function?


2. How many argument/s is/are needed by the
function?
3. The description of a function is given in two
parts that are called the ________________
and the __________________.
4

7 8
Identify the following:
9. Used as a kind of blank, or place holder, to
stand in for the argument.

10. Describes how the function computes the


value it returns.
Given the following function
declaration:

11. What is the type of the value returned by


the function?
Fill-in the blanks
12. The function header is written the same way
as the function declaration, except that the
header does not have a ____________ at
the end.

13. Function declaration is also known as the


__________________.
Identify the following:
14. A figure of speech intended to convey the
image of a physical device that you know
how to use but whose method of operation
is a mystery.
Fill-in the blanks
15. Designing a function so that it can be used as
a black box is sometimes called
______________ or ________________ or
______________.
Programming…
16. (worth 10pts)
Write a function declaration and a function
definition for a function that takes one
argument of type double. The function
returns the character ‘P’ if its argument is
positive and returns ‘N’ if its argument is
zero or negative. (Put an appropriate
function declaration comment)

You might also like