Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SLG IPC144 Week 10

Total questions: 12

Worksheet time: 8mins

Name
Class
Date
1.

To include a header file that is in the current directory, you write:

a)

#include <filename>

b)

#include "filename"

c)

#include filename

d)

#define "filename"

2.

What is NOT a real scope?

a)

Block scope

b)

Global Scope

c)

Function Scope

d)

Local Scope

e)

None of the above

3.

A variable declared outside all function definitions has...

a)

Global Scope

b)

No Scope

c)

Block Scope

d)

Function Scope

4.

A variable that we declare within a function header has...

a)

Parameter Scope

b)

360 No Scope

c)

Function Scope

d)

Header Scope

5.

A variable that we declare within a function body has...

a)

Function Scope

b)

Local Scope

c)

Global Scope

d)

Block Scope

6.

A variable that we declare within a code block has...

a)

No Scope

b)

Global Scope

c)

Block Scope

d)

Local Scope

7.

Write a function prototype called display

that takes an int array called g, and an int called n,

and returns nothing

(a)  

8.

To make a parameter unmodifiable we add:

(a)  

9.

By default arrays pass by:

a)

Address

b)

Value

c)

Structure

10.

By default structures pass by:

a)

Address

b)

Value

c)

None of the above

11.

A function prototype ends with...

a)

;

b)

nothing

c)

{

d)

}

12.

Write the code to get the value of the price member of a struct POINTER called product.

(a)