VBScript/VBScript Mcq Question Set 1 Sample Test,Sample questions

Question:
  _______ is used for finding out about objects, properties and methods. 

1.Object browser

2.Form layout window

3.Code editor window

4.none of the above


Question:
 Given that x = 7, y = 2, and z = 4, the following If block will display “TRUE”. If (x > y) Or (y > z) Then txtBox.Text = “TRUE” End If

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
 One may use an If block within a Select Case block.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
 The following lines of code are correct. If age >= 13 And < 20 Then txtOutput.Text = “You are a teenager.” End If

1.True

2. False

3.all of the above

4.None of the mentioned


Question:
 The Properties window plays an important role in the development of Visual Basic applications. It is mainly used

1.to change how objects look and feel.

2.when opening programs stored on a hard drive.

3.to allow the developer to graphically design program components.

4.to set program related options like Program Name, Program Location, etc.


Question:
 The value returned by InputBox is a string.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
 VBScript is developed by

1.Netscape

2.Opera

3. Sun

4. Microsoft


Question:
 Which browser has built-in support for executing VBScript?

1.Internet Explorer

2.Mozilla Firefox

3.Opera

4.None of these


Question:
 Which of the following is a valid name for a variable?

1.Two_One

2.2One

3. Two One

4.Two.One


Question:
A variable declared inside an event procedure is said to have local scope

1.True

2. False

3.all of the above

4.None of the mentioned


Question:
A variable declared outside of an event procedure is said to have class-level scope.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
An algorithm is defined as:

1.a mathematical formula that solves a problem.

2.a tempo for classical music played in a coda.

3. a logical sequence of steps that solve a problem.

4. a tool that designs computer programs and draws the user interface.


Question:
Asc(“A”) is 65. What is Asc(“C”)?

1. 66

2.67

3. 68

4. “C”


Question:
Asc(“A”) is 65. What is displayed by txtBox.Text = Chr(65) & “BC”?

1. ABC

2.A BC

3.656667

4.Not enough information is available.


Question:
Constructs in which an If block is contained inside another If block are called:

1.multi-If blocks

2.nested If blocks

3.sequential If blocks

4.none of the above


Question:
Extension of ActiveX designers

1. .dsr

2. .axd

3..adx

4. none of the mentioned


Question:
How to take request using get bmethod?

1. Using Request.form

2. Using Response.write

3.Using Request.Querystring

4.Using Request.Servarvariables


Question:
How will you trim the leading as well as trailing spaces of a string using VBScript?

1.Using Trim function

2.Using Len function

3.Using Replace function

4.Using Space function


Question:
In the Select Case statement, which case is used for unknown cases?

1.Else

2. Default

3. Unknown

4.Not possible


Question:
Keywords are also referred to as reserved words.

1.True

2. False

3.all of the above

4.None of the mentioned


Question:
Keywords in Visual Basic are words that

1.should be used when naming variables.

2. are used to name controls, such as TextBox1, Command2, etc.

3. have special meaning and should not be used when naming variables.

4. are used as prefixes for control names (such as txt, btn, lbl, and lst).


Question:
One may use a Select Case block within an If block.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
Option Explicit requires you to declare every variable before its use.

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
Pseudocode is

1.data that have been encoded for security.

2.the incorrect results of a computer program.

3.a program that doesn’t work.

4.a description of an algorithm similar to a computer language.


Question:
Select Case choices are determined by the value of an expression called a selector.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
Sizing Handles make it very easy to resize virtually any control when developing applications with Visual Basic. When working in the Form Designer, how are these sizing handles displayed?

1.A rectangle with 4 arrows, one in each corner, around your control.

2.A 3-D outline around your control.

3.A rectangle with small squares around your control.

4.None of the above.


Question:
The divide-and-conquer-method of problem solving breaks a problem into large, general pieces first, then refines each piece until the problem is manageable.

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
The three main logical operators are _____, ______, and ________.

1.And, Or, Not

2.And, Not, If

3.Or, Not, If

4.False, And, True


Question:
The Visual Basic Code Editor will automatically detect certain types of errors as you are entering code.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
To continue a long statement on another line, use:

1.an underscore character.

2.an ampersand character.

3.Ctrl + Enter.

4.a space followed by an underscore character.


Question:
VBScript was launched in

1.1995

2. 1996

3.1994

4.1997


Question:
Visual Basic responds to events using which of the following?

1. a code procedure

2.an event procedure

3.a form procedure

4. a property


Question:
What does the Option Explicit directive do?

1.It forces you to declare all of your variables

2.It forces you to call the method

3.It forces you to declare all of your static variables

4.It forces you to declare all of your global variables


Question:
What is the correct statement when declaring and assigning the value of 100 to an Integer variable called numPeople

1.Dim numPeople =

2.Dim numPeople = Int(100)

3. numPeople = 100

4.Dim numPeople As Integer = 100


Question:
What is the proper syntax when using a message dialog box?

1. MessageBox.Show(“Hi there”, “Hi”)

2.MessageBox.Show(Hi there, Hi)

3.MessageBox.Show “Hi There”, “Hi”

4.MessageBox.Show Hi There, Hi


Question:
What property of controls tells the order they receive the focus when the tab key is pressed during run time?

1.Focus order

2.Focus number

3. Tab index

4.Control order


Question:
What value will be assigned to the numeric variable x when the following statement is executed? x = 2 + 3 * 4

1. 20

2. 14

3. 92

4.234


Question:
What will be the output of the following statement? txtBox.Text = FormatCurrency(1234.567)

1.$1234.567

2.1,234.57

3.$1234.57

4.$1,234.57


Question:
When creating a new application in Visual Basic, you are asked to supply a name for the program. If you do not specify a name, a default name is XXXXX XXXXX is this default name?

1.Wapplication followed by a number.

2.Application followed by a number.

3.WindowsApplication.

4.WindowsApplication followed by a number.


Question:
When the user clicks a button, _________ is triggered.

1. an event

2.a method

3.a setting

4.a property


Question:
Where to Put the VBScript code

1.Head section

2.Body Section

3.Both body and head section

4.None of these


Question:
Which of the following arithmetic operations has the highest level of precedence?

1.+ –

2. * /

3. ^ exponentiation

4.( )


Question:
Which of the following expressions has as its value the words “Hello World? surrounded by quotation marks?

1. “Hello World”

2.Chr(34) & “Hello World”

3. Chr(34) & Hello World & Chr(34)

4.Chr(34) & “Hello World” & Chr(34)


Question:
Which of the following is a valid Visual Basic conditional statement?

1. 2 < n < 5

2. 2 < n Or < 5

3. 2 < n Or 5

4.(2 < n) Or (n < 5)


Question:
Which of the following is true?

1. “Cat” = “cat”

2.“Cat” < “cat”

3. “Cat” > “cat”

4.Relational operators are only valid for numeric values.


Question:
Which of the properties in a control’s list of properties is used to give the control a meaningful name?

1. Text

2.ContextMenu

3.ControlName

4.name


Question:
Which value for x would make the following condition true: (x >= 5) And (x <= 6)

1. x is equal to 7

2. x is equal to 5

3. x is equal to 5.001

4.None of the mentioned


Question:
Which value for x would make the following condition true: Not (x >= 5)

1.x is equal to 7

2.x is equal to 4

3. x is equal to 5.001

4. x is equal to 5.001


Question:
Which value for x would make the following condition true: x >= 5

1. x is equal to 7

2.x is equal to 5

3.x is equal to 5.001

4. All of the above


Question:
Which VBScript function converts an input string to all lowercase?

1.LCase

2. LowerCase

3.Lower

4.There is no such function to directly convert to lowercase


More MCQS

  1. VBScript Mcq Question Set 1
  2. VBScript Mcq Question Set 2
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!