VB.Net/VB.Net Mcq Question Set 5 Sample Test,Sample questions

Question:
 A procedure-level variable is declared using ____________ keyword.

1. Private

2. Public

3.Dim

4.Static


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

1. Properties window

2.Project Designer Window

3.File Manager

4.Project Manager


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

1.Including

2.Formatting

3.Emphasizing

4.Promoting


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

1.Button

2.Message

3.Property

4.Return type


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

1. True

2.False

3.all of the above

4.None of the mentioned


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

1.Giving them Small names

2.Declaring them with a small sized data type

3.Giving them minimum scope possible

4.Making them class variables


Question:
 What is the specialty of the Default button?

1.Always focused by default

2. Always clears the form it is in

3.Can be selected by the Enter key even when not focused

4.Can be selected by the Shift key even when not focused


Question:
A class-level variable is declared using ______________ keyword.

1.Private

2. Public

3. Dim

4. static


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

1.Constant variable

2.Class variable

3.Named constant

4.Static constant


Question:
ControlChars.NewLine constant is a __________ constant.

1.Pure

2.Invariable

3. Character

4.Intrinsic


Question:
How is a default button designated?

1.Default keyword in the definition of the button

2. Setting the setfocus property to on

3.Keeping the button at the bottom of the form

4.By connecting the AcceptButton property to it


Question:
How many default buttons can a form have?

1.1

2.2

3.3

4.4


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

1.If…Then…Else statement

2.Switch-Case block

3.Recursion

4.function overloading


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

1. Int

2.Char

3. String

4.Object


Question:
Lifetime of a class-level variable is till _______

1. A procedure ends

2. An application ends

3.A block ends

4.Within the control section


Question:
Named constants are used because ______

1. Because they take up less space in memory

2. Because they make documentation and code modification easier

3.Because they can be easily accessed by procedures

4.Because they are easily declared


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

1.Double

2. Object

3. Character

4.String


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

1.Double

2.Object

3.Character

4.Array.arrange()


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

1.Class

2.Any procedures in the form

3.Any form

4.Only the Procedure it is declared in


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

1.Esc

2.Alt

3. Ctrl

4. Shift


Question:
The condition must be a __________ expression.

1.Integer

2.Double

3.Boolean

4. Short


Question:
The InputBox functions prompt argument should be entered using _____

1. Book title capitalization

2. Sentence capitalization

3. Text capitalization

4.Post capitalization


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

1.Condition block

2.Statement block

3.Path block

4.IfElse block


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

1. Integer

2.Double

3.Character

4. strings


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

1. defaultResponse

2.prompt

3.title

4.message


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

1.ControlChars.NewLine

2. ControlChars.NextLine

3. ControlChars.Line

4.ControlChars.blankLine


Question:
The __________ is used to concat to Strings.

1.Concatenation operator

2.+ symbol

3.Concat function

4.Cat function


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

1. Alternative

2.Next

3.Dual

4. Else


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

1. Public

2.Dynamic

3.Private

4.Static


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

1. The value in the Const statement

2.The value of the variable wherever it appears in the program

3.The value of the variable anywhere in the program

4.The value of the variable in one of the procedures in the program


Question:
What happens when a procedure containing the following statements ends?

Dim decSales As Decimal=12.2
Static decTotal As Decimal=13.5

1.Both values lose their values

2.Dim variable loses its value

3.Static variable loses its value

4.Both variables retain their values


Question:
What is the correct syntax to designate a default button?

1.Form.default=button1

2. Form.defaultButton=button1

3.Form.AcceptButton=button1

4.Form.focused=button1


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

1. Used double quotes, should have used single quotes

2.No errors

3.There should be spaces before and after each &

4.Should have ended with a ;


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

1.Double is written

2.Name should be DBLPi

3.“const” starts with a “C”

4.Value is too large


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

1.Double is written

2.Nothing is wrong

3. “Static” starts with a “S”

4.Value is not given


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

1. No error

2.Conditions not in brackets

3.No ; after statements

4.Then’ should have been ‘then’


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

1.Imported

2. Exported

3. Promoted

4.Précised


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

1.Demoted

2.Promoted

3.Exported

4.Converted


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

1.Class-level variable

2.Object variable

3.Procedure-level variable

4.Auto variable


Question:
Which of the following is called the line continuation character?

1.*

2.^

3. –

4. _


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

1.Option Strict On

2.Option Strict Off

3.Implicit Off

4. Explicit On


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

1.Inputbox function

2. Inbox function

3.Dialogbox function

4.In function


Question:
____ function is used to format numbers.

1.toString

2.toNumber

3. toFormat

4. toSpecify


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

1.Procedure-level variable

2.Class-level variable

3.Static variable

4.Dynamic variable


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

1.Advance pointer

2.Nextpoint pointer

3. NextLine constant

4.ControlChars.NewLine constant


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

1. Option Infer Off

2.Option Infer On

3.Option On

4. Option off


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

1.Underscore

2. Hyphen

3.Line continuation character

4.Line termination character


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

1. Implicit type conversion

2.Explicit type conversion

3.Convert method

4.Conversion function


Question:
______ prevents you from using undeclared variable in your code.

1.Option Explicit On

2.Option Implicit On

3.Explicit Off

4.Implicit Off


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

1.formatString

2. format

3.numericVariableName

4. toString


More MCQS

  1. VB.Net Mcq Question Set 1
  2. VB.Net Mcq Question Set 2
  3. VB.Net Mcq Question Set 3
  4. VB.Net Mcq Question Set 4
  5. VB.Net Mcq Question Set 5
  6. VB.Net Mcq Question Set 6
  7. VB.Net Mcq Question Set 7
  8. VB.Net Mcq Question Set 8
  9. VB.Net Mcq Question Set 9
  10. VB.Net Mcq Question Set 10
  11. VB.Net Mcq Question Set 11
  12. VB NET MCQ SET 1
  13. VB NET MCQ SET 2
  14. VB NET MCQ SET 3
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!