wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CSC128 - Chapter 5i

Total questions: 7

Worksheet time: 3mins

Name
Class
Date
1.

Function is divided into ___ categories.

a)

1

b)

2

c)

3

d)

4

2.

There are ___ types of user-defined function.

a)

1

b)

2

c)

3

d)

4

3.

Which of the following is NOT the requirement of a function?

a)

Function Call

b)

Function Definition

c)

Function Initialization

d)

Function Declaration

4.

When there is a value from a function to be return into the main program, we use this type of function.

a)

Function without return value

b)

Function with return value

c)

Function within return value

5.

Function Declaration is placed __________.

a)

Before main program

b)

Inside Main Program

c)

Outside or After Main Program

6.

Given function declaration :

float CalcAverage (float, int);


What is the best definition of the given function declaration.

a)

Declare the function CalcAverage() that will receive 2 floating-point value and 1 integer value, and did not return any value

b)

Declare the function CalcAverage() that will receive 1 floating-point value, and will return 1 floating-point value and 1 integer value

c)

Declare the function CalcAverage() that will receive 1 floating-point value and 1 integer value, and will return 1 floating-point value

7.

Which of the following is not mathematical function in predefined function cmath?

a)

pow (x, y)

b)

log (x)

c)

setw (x)

d)

abs (x)