wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Visual Basic - Revision Class 8

Total questions: 12

Worksheet time: 8mins

Name
Class
Date
1.

What is IDE?

a)

Integrated Development Engine

b)

Individual Division Entrepreneur

c)

Integrated Development Environment

d)

Integrated Diplomatic Engineering

2.

What is the use of 'Dim' ?

a)

To check whether a variable is real or fake.

b)

To declare a command

c)

To declare a variable

d)

None of the above

3.

What are the rules for declaring variable names in VB?

a)

It should not begin with a number

b)

There should be no space or period within the name

c)

It should be less than 255 characters

d)

All of these

e)

None of these

4.

What are the different sections of data types?

a)

Constant and Variable Datatypes

b)

Numeric and Non- Numeric Datatypes

c)

Numeric String and Non- Numeric Constant

d)

All of these

5.

Choose the relational operator from the ones given...

a)

+ addition

b)

^ exponentiation

c)

<> not equal to

d)

MOD - remainder

e)

\ Integer division

6.

Find the wrong line in the code... if hello = 6


Dim hello as Integer

Integer = TextBox1.text

If hello MOD 2 = 0 Then

Label2.text = "Even Number"

Else

Label2.text = "Odd Number"

End If

a)

Integer = TextBox1.text

b)

Label2.text = "Odd Number"

c)

Dim hello as Integer

d)

None of these

7.

What type of a operators are OR and AND ?

a)

Relational

b)

Logical

c)

Arithemetic

d)

Optional

8.

Give the output of the code... If Rain = 14


Dim Rain as Single

Rain = TextBox1.text

Select Case Rain


Case 1 to 5

MsgBox("Rainfall is low")

Case 6 to 10

MsgBox("Rainfall is medium")

Case 11 to 15

MsgBox("Rainfall is high")

a)

Rainfall is low

b)

Rainfall is medium

c)

Rainfall is high

d)

Error in line - Dim Rain as Single

9.

Loops are know as _________ in programming languages.

a)

interactive statements

b)

Iterative statements

c)

Intellogical statements

d)

Insperective statements

10.

Find the output of the given code


Dim sequence as Integer

For sequence = 0 to -20 Step -2

LIstBox1.Items.Add(sequence)

Next

a)

-1, -3 , -5, -7, -9 ...... - 20

b)

0, -2, -4, -6, -8 ....... -20

c)

0, -20, -40, -60, -80 ....... -200

d)

0, 2, 4, 6, 8 ...... 20

11.

Select the non numeric data type

a)

Date

b)

Boolean

c)

Object

d)

String

e)

All of these

12.

What is the file extension of VB?

a)

.ppt

b)

.sb2

c)

.vb

d)

.py