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

Posted Date:-2022-02-05 10:41:40


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

Posted Date:-2022-02-05 10:52:11


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

Posted Date:-2022-02-05 10:53:16


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

1.Button

2.Message

3.Property

4.Return type

Posted Date:-2022-02-05 10:56:27


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

Posted Date:-2022-02-05 10:41:59


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

Posted Date:-2022-02-05 10:46:37


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

Posted Date:-2022-02-05 10:59:41


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

1.Private

2. Public

3. Dim

4. static

Posted Date:-2022-02-05 10:41:18


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

1.Constant variable

2.Class variable

3.Named constant

4.Static constant

Posted Date:-2022-02-05 10:43:25


Question:
ControlChars.NewLine constant is a __________ constant.

1.Pure

2.Invariable

3. Character

4.Intrinsic

Posted Date:-2022-02-05 10:58:42


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

Posted Date:-2022-02-05 11:00:49


Question:
How many default buttons can a form have?

1.1

2.2

3.3

4.4

Posted Date:-2022-02-05 11:00:24


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

Posted Date:-2022-02-05 11:01:55


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

Posted Date:-2022-02-05 10:47:56


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

Posted Date:-2022-02-05 10:40:54


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

Posted Date:-2022-02-05 10:43:50


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

1.Double

2. Object

3. Character

4.String

Posted Date:-2022-02-05 10:51:27


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

1.Double

2.Object

3.Character

4.Array.arrange()

Posted Date:-2022-02-05 10:50:56


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

Posted Date:-2022-02-05 10:42:55


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

1.Esc

2.Alt

3. Ctrl

4. Shift

Posted Date:-2022-02-05 11:00:03


Question:
The condition must be a __________ expression.

1.Integer

2.Double

3.Boolean

4. Short

Posted Date:-2022-02-05 11:02:46


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

1. Book title capitalization

2. Sentence capitalization

3. Text capitalization

4.Post capitalization

Posted Date:-2022-02-05 10:56:04


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

Posted Date:-2022-02-05 11:03:11


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

Posted Date:-2022-02-05 10:54:21


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

1. defaultResponse

2.prompt

3.title

4.message

Posted Date:-2022-02-05 10:56:53


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

Posted Date:-2022-02-05 10:57:29


Question:
The __________ is used to concat to Strings.

1.Concatenation operator

2.+ symbol

3.Concat function

4.Cat function

Posted Date:-2022-02-05 10:52:49


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

1. Alternative

2.Next

3.Dual

4. Else

Posted Date:-2022-02-05 11:02:20


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

1. Public

2.Dynamic

3.Private

4.Static

Posted Date:-2022-02-05 10:47:06


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

Posted Date:-2022-02-05 10:46:06


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

Posted Date:-2022-02-05 10:45:40


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

Posted Date:-2022-02-05 11:01:11


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 ;

Posted Date:-2022-02-05 10:59:14


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

Posted Date:-2022-02-05 10:44:18


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

Posted Date:-2022-02-05 10:45:08


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’

Posted Date:-2022-02-05 11:07:16


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

Posted Date:-2022-02-05 10:49:44


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

Posted Date:-2022-02-05 10:50:06


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

Posted Date:-2022-02-05 10:40:32


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

1.*

2.^

3. –

4. _

Posted Date:-2022-02-05 10:58:17


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

Posted Date:-2022-02-05 10:50:29


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

Posted Date:-2022-02-05 10:55:12


Question:
____ function is used to format numbers.

1.toString

2.toNumber

3. toFormat

4. toSpecify

Posted Date:-2022-02-05 10:53:56


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

Posted Date:-2022-02-05 10:42:32


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

Posted Date:-2022-02-05 10:57:56


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

Posted Date:-2022-02-05 10:48:55


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

Posted Date:-2022-02-05 10:55:38


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

Posted Date:-2022-02-05 10:49:21


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

1.Option Explicit On

2.Option Implicit On

3.Explicit Off

4.Implicit Off

Posted Date:-2022-02-05 10:48:24


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

1.formatString

2. format

3.numericVariableName

4. toString

Posted Date:-2022-02-05 10:54:44


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!