Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CProg 1st Semester Final Exam Review Part 3

Total questions: 17

Worksheet time: 9mins

Name
Class
Date
1.

Which of the following symbols is used to place documentation in a program and causes the computer to ignore the remaining content on the line?

a)

/

b)

/*

c)

*/

d)

'

2.

In the mathematical expression 4 * 3 + 15 / 3 - 6, which operation is performed first?

a)

Addition

b)

subtraction

c)

multiplication

d)

division

3.

In the mathematical expression 4 * 3 + 15 / 3 - 6, which operation is performed LAST?

a)

addition

b)

subtraction

c)

multiplication

d)

division

4.

In the mathematical expression 12/6/2, the answer is ____.

a)

1

b)

2

c)

3

d)

4

5.

The ____function can be used to improve the appearance of the numbers displayed on a screen.

a)

Arrange

b)

Change

c)

Display

d)

Format

6.

Which of the following satements formats the contents of the lblSales control with a percent sign and two digits to the right of the decimal?

a)

lblSales.Text = Format (lblSales.Text, "Percent")

b)

lblSales = Format (lblSales.Text, "Percent")

c)

lblSales.Text = Format (lblSales.Text, "Fixed")

d)

lblSales.Text = Format ( "Percent", lblSales.Text)

7.

Spaces are allowed in variable names

a)

True

b)

False

8.

All numeric variables are automatically initialized to 0 if no initial value is specified when the variable is declared

a)

True

b)

False

9.

A Boolean variable is initialized to the value True if no initial value is stated when the variable is declared.

a)

True

b)

False

10.

A variable declared in the Declaration section of a form is called a procedure -level variable.

a)

True

b)

False

11.

Instead of storing data in the properties of various controls, a programmers can create ____, which are memory locations inside the computer, to store data.

a)

characters

b)

variables

c)

integers

d)

strings

12.

Which of the following statements declares a Double variable named dblTax

a)

Dim dblTax as Integer

b)

Dim dblTax as Double

c)

Dim variableTax as Double

d)

Dim as dblTax Double

13.

Which of the following can store a number containing whole numbers?

a)

Double

b)

Integer

c)

String

d)

Boolean

14.

Every numeric data type in Visual Basic has a ____ method that can be used to convert a string to that numeric data type.

a)

Convert

b)

Format

c)

TryParse

d)

Number

15.

You declare a class level variable using the ____keyword

a)

Dim

b)

Mod

c)

Private

d)

Static

16.

You create a named constant using the ____ statement

a)

Fixed

b)

Const

c)

ContantFixed

d)

Perm

17.

Which of the following correctly assigns the text "correct" the the constant strCorrect?

a)

Const As strCorrect String = "correct"

b)

Const strCorrect As String = "correct"

c)

Dim Const strCorrect = "correct"

d)

Const conCorrect as String = "correct"