VB.Net MCQ Quiz Hub

VB.Net Mcq Question Set 5

Choose a topic to test your knowledge and improve your VB.Net skills

When you declare a variable in the form’s declaration section, it is called as _______





✅ Correct Answer: 1

Lifetime of a class-level variable is till _______





✅ Correct Answer: 2

A class-level variable is declared using ______________ keyword.





✅ Correct Answer: 1

A procedure-level variable is declared using ____________ keyword.





✅ Correct Answer: 3

Two procedures can have procedure-level variable whose names are same.





✅ Correct Answer: 1

_____ is a variable that remains in memory, and retains its value even after the procedure declaring it ends.





✅ Correct Answer: 3

Static variable can only be used in the __________ in which it is declared.





✅ Correct Answer: 4

A __________ cannot change its value while the application is running.





✅ Correct Answer: 3

Named constants are used because ______





✅ Correct Answer: 2

What is wrong with the expression “const dblPi As Double = 3.141593”?





✅ Correct Answer: 3

What is wrong with the expression “static dblPi AsDouble ”?





✅ Correct Answer: 3

What happens when a procedure containing the following statements ends? Dim decSales As Decimal=12.2 Static decTotal As Decimal=13.5





✅ Correct Answer: 2

Using a named constant is advantageous because to change a value in future, change ______





✅ Correct Answer: 1

Unintentional errors in application by declaring variables can be reduced by ____





✅ Correct Answer: 3

To declare a class-level named constant you declare it as __________





✅ Correct Answer: 3

In Visual Basic, if you keep a variable undeclared, it is automatically taken as___________ data type.





✅ Correct Answer: 4

______ prevents you from using undeclared variable in your code.





✅ Correct Answer: 1

______ ensures every variable and named constant is declared with a data type.





✅ Correct Answer: 1

______ is used to fit the value of the data type to that of the memory location, implicitly.





✅ Correct Answer: 1

When a value is converted from one data type to another and can store numbers with greater precision, the value is said to be ___





✅ Correct Answer: 3

When a value is converted from one data type to another and can store numbers with less precision, the value is said to be ____





✅ Correct Answer: 1

You can eliminate the problems of implicit type conversion, with the help of ______





✅ Correct Answer: 1

Option Strict On disallows conversion of String data type to __________ implicitly.





✅ Correct Answer: 1

Option Strict On disallows conversion of Double data type to __________ implicitly.





✅ Correct Answer: 4

Instead of entering the Option statements in the Code Editor window, you also can enter in the _____





✅ Correct Answer: 2

The __________ is used to concat to Strings.





✅ Correct Answer: 1

Specifying the number of decimal places and special characters to display in a number is called as ____





✅ Correct Answer: 2

____ function is used to format numbers.





✅ Correct Answer: 1

The toString method formats the number stored in the numeric value and then returns the result as a _____





✅ Correct Answer: 4

________ in the syntax gives the format you want to use.





✅ Correct Answer: 1

____ displays an input dialog box containing a message, Ok and Cancel button and an input area.





✅ Correct Answer: 1

______ is an underscore that is immediately preceded by a space and is located at the end of the physical line of code.





✅ Correct Answer: 3

The InputBox functions prompt argument should be entered using _____





✅ Correct Answer: 2

The value returned by the Inputbox depends on the __________ the user chooses.





✅ Correct Answer: 1

The __________ argument contains the message to display inside the dialog box.





✅ Correct Answer: 2

The __________ constant instructs the computer to advance the insertion point to the next line in control.





✅ Correct Answer: 1

______ can be used to advance the insertion point in a file or on the printer.





✅ Correct Answer: 4

Which of the following is called the line continuation character?





✅ Correct Answer: 4

ControlChars.NewLine constant is a __________ constant.





✅ Correct Answer: 4

What is wrong with the below statement?Msg.Text=”This is an example”&ControlChars.NewLine&“Example”.





✅ Correct Answer: 3

What is the specialty of the Default button?





✅ Correct Answer: 4

The Cancel Button’s procedure is accessed by __________ key.





✅ Correct Answer: 1

How many default buttons can a form have?





✅ Correct Answer: 1

How is a default button designated?





✅ Correct Answer: 4

What is the correct syntax to designate a default button?





✅ Correct Answer: 3

In Visual Basic __________ is used for coding single-alternative and dual-alternative selection structures.





✅ Correct Answer: 1

The __________ keyword is necessary only in a dual-alternative selection structure.





✅ Correct Answer: 4

The condition must be a __________ expression.





✅ Correct Answer: 3

The set of statements contained in each path is referred to as a _____





✅ Correct Answer: 2

What is wrong with the following if-else structure? If intQuantity > 5 Then dblDiscountRate = .1 Else dblDiscountRate = .05 End If





✅ Correct Answer: 1