1 - PDFsam - V.B 6.0 - Visual Basic Multiple Choice Questions and Answers
1 - PDFsam - V.B 6.0 - Visual Basic Multiple Choice Questions and Answers
1 - PDFsam - V.B 6.0 - Visual Basic Multiple Choice Questions and Answers
V.B 6.0
7. 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?
A. A rectangle with 4 arrows, one in each corner, around your control.
B. A 3-D outline around your control.
C. A rectangle with small squares around your control.
D. None of the above.
Ans: C
8. The Properties window plays an important role in the development of Visual Basic
applications. It is mainly used
A.to change how objects look and feel.
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 1/17
9/24/2018 V.B 6.0: Visual Basic Multiple Choice Questions and Answers
B. when opening programs stored on a hard drive.
C. to allow the developer to graphically design program components.
D. to set program related options like Program Name, Program Location, etc.
Lagos - New York City
Ans: A
₦ 338,731
9. 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?
A. Wapplication followed by a number.
B. Application followed by a number. LEARN MORE
C. WindowsApplication.
D. WindowsApplication followed by a number.
Ans: C,B Lagos - Accra
10. Which of the properties in a control’s list of properties is used to give the control a
meaningful name?
A. Text ₦ 242,855
B. ContextMenu
C. ControlName
D. Name
Ans: D LEARN MORE
11. Pseudocode is
A. data that have been encoded for security.
B. the incorrect results of a computer program. Lagos - Paris
C. a program that doesn’t work.
D. the obscure language computer personnel use when speaking.
₦ 347,050
E. a description of an algorithm similar to a computer language.
Ans: E
12. An algorithm is defined as:
A. a mathematical formula that solves a problem. LEARN MORE
B. a tempo for classical music played in a coda.
C. a logical sequence of steps that solve a problem.
D. a tool that designs computer programs and draws the user interface.
Ans: C
13. A variable declared inside an event procedure is said to have local scope
A. True
B. False Total Pageviews
Ans: A
14. A variable declared outside of an event procedure is said to have class-level scope. 332625
A. True
B. False
Popular Posts
Ans: A
15. Option Explicit requires you to declare every variable before its use. Visual Basic Multiple Choice Questions and
A. True Answers
B. False 1. The Visual Basic Code Editor will
Ans: A automatically detect certain types of
errors as you are entering code. A. True B.
16. The value returned by InputBox is a string. False Ans: A 2. ...
A. True
B. False Creating Reports using Crystal Reports
Ans: A Crystal Report Writer is a report generation
17. What is the correct statement when declaring and assigning the value of 100 to an tool. It is used to generate simple to
slightly complex reports. However, with
Integer variable called numPeople Visual Basic 6....
A. Dim numPeople =
B. Dim numPeople = Int(100) Object Linking and Embedding (OLE)
C. numPeople = 100 What is OLE? OLE (Object Linking and
Embedding) is a means to interchange data
D. Dim numPeople As Integer = 100
between applications. Of late OLE has
Ans: D been enhanced to provi...
18. Which of the following arithmetic operations has the highest level of precedence?
A. + – Keyboard Events and Mouse Events
B. * / Keyboard and Mouse are two most
important input devices. When user uses
C. ^ exponentiation these devices, Visual Basic generates a set
D. ( ) of events. In this chap...
Ans: C
19. What value will be assigned to the numeric variable x when the following statement is Common Dialog Control
executed? x = 2 + 3 * 4 In Windows operating system, we often see
a set of commonly used dialog boxes, such
A. 20 as Open dialog box. For example, when
B. 14 you choose File -&...
C. 92
D. 234 Working with Check box, Option button
and Frame
Ans: B
Checkbox is used to deal with toggle
options, which have only two possible
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 2/17
9/24/2018 V.B 6.0: Visual Basic Multiple Choice Questions and Answers
20. Which of the following is a valid name for a variable? states – true/ false, or yes/no. Checkbox
can be in either of t...
A. Two_One
B. 2One
File Handling
C. Two One A file is a collection of bytes stored on the
D. Two.One disk with a given name (called as
Ans: A filename). Every development tool
provides access to these f...
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 3/17
9/24/2018 V.B 6.0: Visual Basic Multiple Choice Questions and Answers
D. Relational operators are only valid for numeric values. Star War VB Program
Ans: B System Objects
31. Which of the following is a valid Visual Basic conditional statement? Tic-Tac-Toe Game in VB
A. 2 < n < 5
Timer and Scrollbars
B. 2 < n Or < 5
VB 6 Windows Media Player
C. 2 < n Or 5
VB 6.0 Interview Questions & Answers
D. (2 < n) Or (n < 5)
Ans: D VB questions and answers
32. The three main logical operators are ________, _________, and ________. VB.NET - Interview Questions & Answers
A. And, Or, Not VB.NET Interview Questions
B. And, Not, If VB.NET top Interview questions and
C. Or, Not, If answers
D. False, And, True vb6.0 interview questions and answers
Ans: A Visual Basic 6.0 and VB6.0 Interview
33. Which value for x would make the following condition true: x >= 5 questions and answers
A. x is equal to 7 Visual Basic 6.0 Interview Questions and
B. x is equal to 5 Answers
C. x is equal to 5.001 Visual Basic Multiple Choice Questions and
Answers
D. all of the above
Ans: D Working with Data Access Objects (DAO)
34. Which value for x would make the following condition true: Not (x >= 5) Working with Menus
A. x is equal to 7
B. x is equal to 4
About Me
C. x is equal to 5.001
D. x is equal to 5.001 bagadhi sateesh
Ans: B Follow 0
35. Which value for x would make the following condition true: (x >= 5) And (x <= 6)
View my complete profile
A. x is equal to 7
B. x is equal to 5
C. x is equal to 5.001
Ans: B,C
Blog Archive
36. Constructs in which an If block is contained inside another If block are called:
A. multi-If blocks ▼ 2017 (41)
B. nested If blocks ► May (4)
C. sequential If blocks ► April (5)
D. none of the above
► March (6)
Ans: B
37. One may use an If block within a Select Case block. ► February (11)
A. True ▼ January (15)
B. False ActiveX Control Related Objects and
Ans: A Property pages...
38. One may use a Select Case block within an If block. Data Bound ActiveX Control and Data
A. True Repeater
B. False
ActiveX Document
Ans: A
DHTML Application (Dynamic HTML)
39. Select Case choices are determined by the value of an expression called a selector.
A. True Active Server Pages and IIS Application
B. False INTERFACES
Ans: A
Object Linking and Embedding (OLE)
40. Items in the value list must evaluate to a literal of the same type as the selector INTRODUCTION VB 6.0
A. True UNIT-III Graphics in VB
B. False UNIT-II Handling controls
Ans: A
UNIT – I Familiarization about the Visual
41. A single Case statement can contain multiple values.
Basic ID...
A. True
VB.NET - Interview Questions & Answers
B. False
Ans: A Visual Basic Multiple Choice Questions
42. You can specify a range of values in a Case clause by using the To keyword. and Answers...
A. True VB Questions and Answers
B. False VB.NET top Interview questions and
Ans: A answers
43. A variable declared inside a Select Case block cannot be referred to by code outside of
the block. ► 2016 (14)
A. True ► 2012 (6)
B. False
► 2011 (28)
Ans: A
44. Suppose that the selector in a Select Case block is the string variable myVar. Which of
the following is NOT a valid Case clause?
A. Case “Adams”
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 4/17
9/24/2018 V.B 6.0: Visual Basic Multiple Choice Questions and Answers
B. Case “739”
C. Case (myVar.Substring(0, 1)
D. Case myVar.Length BSc in
Ans: D
45. Different items appearing in the same value list of a Select Case block must be
separated by a ____________.
Computer
A. semi colon
B. comma Science
C. colon
D. pair of quotation marks
Ans: B
46. Which Case clause will be true whenever the value of the selector in a Select Case
block is between 1 and 5 or is 8?
A. Case 1 To 8
B. Case 1 To 5, 8
C. Case 1 To 8, 5
D. Case 1 To 5; 8
Ans: B
47. Which Case clause will be true whenever the value of the selector in a Select Case
block is greater than or equal to 7?
A. Case Is >7
B. Case Is = 8
C. Case Is >= 7 BSc in Computer
D. Case Is <= 8
Ans: C Science
48. What type of items are valid for use in the value list of a Case clause?
A. literals Unicaf University
B. variables
C. expressions
D. all of the above
Ans: D
49. What happens to a variable declared locally inside a Sub procedure after the procedure
terminates?
A. It maintains its value even after the End Sub statement executes.
B. It ceases to exist after the End Sub statement executes.
C.It loses its value temporarily after the End Sub statement executes, but regains that
Pages
value upon re-entry to the Sub procedure.
D. It is reset to its default value. Home
Ans: B
50. Suppose a variable is passed by reference to a parameter of a Sub procedure, and the
parameter has its value changed inside the Sub procedure. What will the value of the
variable be after the Sub procedure has executed?
A. It will have the newly modified value from inside the Sub procedure.
B. Its value can?t be determined without more information.
C. It will retain the value it had before the call to the Sub procedure
D. None of the above.
Ans: A
51. Suppose a variable is passed by value to a parameter of a Sub procedure, and the
parameter has its value changed inside the Sub procedure. What will the value of the
variable be after the Sub procedure has executed?
A. It will have the newly modified value from inside the Sub procedure.
B. Its value can?t be determined without more information
C. It will retain the value it had before the call to the Sub procedure
D. None of the above.
Ans: C
52. The declaration statement for a class-level variable should be placed __________.
A. inside an event procedure
B. inside a general procedure
C. anywhere in the program region, except inside a procedure
D. above the statement Public Class frmName
Ans: C
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 5/17
9/24/2018 V.B 6.0: Visual Basic Multiple Choice Questions and Answers
54. What will be the output of the following program when the button is clicked?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim number As Double = 3
DoubleAndSquare(number)
txtBox.Text = CStr(number)
End Sub
Sub DoubleAndSquare(ByRef myVar As Double)
myVar = myVar + myVar
myVar = myVar * myVar
A. 3
B. 36
Is Jesus
C. 6
D. 0 Really God?
Ans: B
55. Suppose the variable myName is declared in a Dim statement in two different Sub
procedures. Which statement is true?
A. The program will malfunction when it is executed.
B. When the value of myName is changed in one Sub procedure, it will also be changed in
the other Sub procedure.
Discover the Evidence
C. Visual Basic’s smart editor will alert you that this is an error before the program is
From Scholars About
executed.
D. The two variables will be local to their respective Sub procedures. Jesus' Claims to be
Ans: D
56. Which of the following statements is guaranteed to pass the variable numVar by value God
to the Sub procedure Tally?
A. Tally(numVar)
B. Tally(ByVal numVar)
C. Tally((numVar))
D. Tally(ByVal numVar As Double)
Ans: D
57. The ______________ of a Sub procedure are vehicles for passing numbers and strings to
the Sub procedure.
A. Call Statements
Y-Jesus
B. arguments
C. parameters
D. variables declared inside
Ans: C
58. Which of the following is NOT a reason for using procedures?
A. They break a complex problem down into smaller pieces.
B. They make a program run faster.
C. They can be reused easily.
D. They make it possible for a team of people to work together on a single program.
Ans: B
59. Which one of the following is true about arguments and parameters?
A. Arguments appear in Call statements; parameters appear in Sub statements.
B. Parameters appear in Call statements; arguments appear in Sub statements.
C. They are synonymous terms.
D. They are completely unrelated in a program.
Ans: A
60.Each individual variable in the list student(0), student(1), student(2) is known as a(n)
A. subscript
B. dimension
C. element
D. type
Ans: C
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 6/17
9/24/2018 V.B 6.0: Visual Basic Multiple Choice Questions and Answers
A. True
B. False
Ans: B
66. Suppose you want to write a procedure that takes three numbers, num1, num2, and
num3; and returns their sum, product, and average. It is best to use a Function procedure
for this task.
A. True
B. False
Ans: B
67. Although a function can return a value, it cannot directly display information in a text
box.
A. True
B. False
Ans: B
68. Function procedures can invoke other Function procedures.
A. True
B. False
Ans: A
69. A Function may return up to two values.
A. True
B. False
Ans: B
70. The input to a user-defined function can consist of:
A. a single value
B. one or more values
C. no values
D. All of the above
Ans: D
71. Variables appearing in the header of a Function procedure are called ____________.
A. values of the function
B. parameters
C. coordinates
D. arguments
Ans: B
72. The arguments appearing in a Call statement must match the parameters in the
appropriate Sub or Function header in all but one of the following ways. Which one?
A. Number of arguments
B. Names of arguments
C. Data type of arguments
D. Order of arguments
Ans: B
73. What will be the output of the following program when the button is clicked?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim word, result As String
word = “Benjamin”
result = Rotate(word)
result = Rotate(result & word)
result = Rotate(result)
txtBox.Text = result
End Sub
Function Rotate(ByVal var As String) As String
Dim varlength As Integer
varlength = var.Length
Return var.Substring(1) & var.Substring(0, 1)
End Function
A. jaminBBenjaminen
B. BenjaminBenjamin
C. njaminBe
D. None of the above
Ans: A
74. What is displayed when the button is clicked?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim a, b as String
Dim x as Integer
a = “How now brown cow.”
b = “brown”
x = FindIt(a, b)
txtBox.Text = CStr(x)
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 7/17
9/24/2018 V.B 6.0: Visual Basic Multiple Choice Questions and Answers
End Sub
Function FindIt(ByVal z1 as String, ByVal z2 as String) As Integer
Dim x as Integer
x = z1.IndexOf(z2)
End Function
“How now”
A. 8
B. 0
C. An error
D. None of the above
Ans: D
75. A Do While loop checks the While condition before executing the statements in the
loop.
A. True
B. False
Ans: A
76. A Do?Loop Until block is always executed at least once
A. True
B. False
Ans: A
78. The value of the control variable should not be altered within the body of a For?Next
loop.
A. True
B. False
Ans: B
79. The body of a For…Next loop in Visual Basic will always be executed once no matter
what the initial and terminating values are.
A. True
B. False
Ans: B
80. The body of a For…Next loop in Visual Basic will always be executed once no matter
what the initial and terminating values are. duplicate question?
A. True
B. False
Ans: B
https://free-visualbasic-tutor.blogspot.com/2017/01/visual-basic-multiple-choice-questions.html 8/17