wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Function Revision2

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

A function that has no return type starts with:

a)

int

b)

void

c)

Arguments

d)

Braces

2.

Fill in the blank to have this function work properly


_____ function ( ) {


int c;

int a = 4;

int b = 5;

c=a*b;

return c;

}

a)

string

b)

int

c)

void

d)

variable

3.

True or False. We can call functions inside of other functions.

a)

True

b)

False

4.

What will print?

a)

20

b)

40

c)

60

d)

50

5.

What will print?

a)

10

b)

20

c)

30

d)

40

6.

What will print?

a)

0

b)

1

c)

100

d)

101

7.

What will print?

a)

0

b)

1

c)

100

d)

101

8.

What will print?

a)

0

b)

6

c)

100

d)

none of these

9.

What will print?

a)

0

b)

1

c)

5

d)

10

10.

What will print?

a)

s

b)

m

c)

d

d)

e