VB.NET Variables and Data Types. online Test

You are writing a VB.NET program that calculates the sales tax on an item. You plan to store the sales tax in a variable. When declaring the variable, which data type would be the most appropriate to use?


In VB.NET, which one of the following statements could be used to declare a variable called, MyVariable, as an Integer data type,


Is the following statement true or false,

In Visual Basic 2010, it is possible to use a variable before declaring it.


Which one of the following is NOT a valid variable name?


Is the following statement true or false.

Visual Basic 2010 allows variables to be assigned a value when they are declared.


You are working on a VB.NET application that prompts the user for the information shown on the form below. You then transfer this information to variables. When declaring the variable to hold the information about the user’s age, what data type would be most appropriate?


What value will be displayed in the MessageBox when the following lines of code are executed?

Dim intX as Integer

intX=3.14

MessageBox.Show(intX.ToString)


Given the variable declaration shown below, what is the largest decimal value that can be stored in X?

Dim X As Byte


Which one of the following is not a valid variable name?


How many bits does Visual Basic 2010 reserve for the variable declared below

Dim intX as Integer



















Description:

10 questions over VB.NET variables and data types.

Comments
Murali
By: Murali
651 days 11 hours 36 minutes ago

Good Question for testing knowledge in vb.net

v.hema
By: v.hema
530 days 9 hours 29 minutes ago

its really useful

Malcolm Fox
By: Malcolm Fox
488 days 2 hours 55 minutes ago

Thank you!

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
David _
Electrical Engineering Technology
User
15 Followers

Your Facebook Friends on WizIQ

More Tests By Author

VB.NET Basic Button properties
5 Questions | 276 Attempts

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect