wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

BenchmarkI RetestPractice - CMPI

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

The use of a hexadecimal numbering system in computers allows the computer to:

a)

convert small numbers quickly

b)

represent small amounts of information in a large database

c)

store data with little room for error

d)

use less disk space in storing data

2.

The best way to compare a binary number to a hexadecimal number is to convert:

a)

the binary number to a decimal number and then compare that to the hexadecimal number

b)

the binary number to a hexadecimal number and compare that to the hexadecimal number

c)

the hexadecimal number to a binary number and then to a decimal value to compare

d)

the hexadecimal number to a decimal number and compare that to the binary number

3.

What is a set of steps that create an ordered approach to a problem solution called?

a)

Pseudocode

b)

Flowcharting

c)

Algorithm

d)

Modularization

4.

Which of the choices below is not a Basic Control Structure?

a)

Simple sequence control structure

b)

Conditional control structure

c)

Iteration control structure

d)

Pseudocode control structure

5.

Which method formats output as currency?

a)

dblMoney.ToString("$##.00")

b)

dblMoney.ToString($##.00)

c)

dblMoney.ToString= $##.00

d)

dblMoney.ToString= "$##.00

6.

Josie is writing a program and needs a variable that can be accessed from multiple event procedures. What scope of variable should she use?

a)

Procedural

b)

Global

c)

Local

d)

Non-Local

7.

Kirk wants to declare a variable that holds its value beyond the normal lifetime. How should he declare it?

a)

Static intGrade As Integer

b)

Dim Static intGrade As Integer

c)

Static Dim intGrade As Integer

d)

Dim intGrade As Integer

8.

What is the correct code to create a message box from the following code?

lblcost.Text= "The cost of the product is: " & (deccost + dectax)

a)

MessageBox.Show "The cost of the product is: " & (deccost + dectax)

b)

MessageBox.Show ("The cost of the product is: "& (deccost + dectax))

c)

Textbox.Show ("The cost of the product is: " & (deccost + dectax))

d)

Textbox.show =("The cost of the product is: " & (deccost + dectax))

9.

If a student needed to declare a variable to hold values representing a grade point average (GPA), which would be the best declaration given programming naming conventions?

a)

Dim dblGPA As Double

b)

Dim intGPA As Double

c)

Dim intGPA As Integer

d)

Dim strGPA As String

10.

If 5 and 2 are entered in txtNumber1 and txtNumber2, respectively, what will the following code display?

Dim intNumber1 As Integer= Convert.ToInt32(txtNumber1.Text)

Dim intNumber2 As Integer= Convert.ToInt32(txtNumber2.Text)

Dim intResult As Integer

intResult= intNumber1 Mod intNumber2

lblAnswer.Text= intResult.ToString()

a)

1

b)

2

c)

3

d)

5