Visual Basic MCQ
Visual Basic MCQ
Answer: B
Answer: C
3. Which windows displays a list of all forms and modules making up your application
A. Project window B. Properties window
C. Form layout window D. All of the above
Answer: A
Answer: A
5. Which of the following windows is the central to the development of Visual Basic applications
A. Project window B. Form window
C. Properties window D. All of the above
Answer: B
6. Which of the following provides quick access to commonly used commands in the programming
environment
A. Toolbox B. Object browser
C. Toolbar D. None of these
Answer: C
Answer: C
8. ………… is used for finding out about objects, properties and methods.
A. Object browser B. Property window
C. Form layout window D. Code editor window
Answer: A
Answer: A
10. A text box can hold as many as ……. characters for a single line text.
A. 2052 B. 2048
C. 2058 D. 2047
Answer: B
11. A text box can hold as many as ……… characters for a multi-line text
A. 42000 B. 48000
C. 23000 D. 32000
Answer: D
12. ……….. control is used to provide an identifiable grouping for other controls
A. Frame B. Label
C. List box D. Command button
Answer: A
13. . ……….property is used to set the maximum length of a text, a textbox can hold
A. Maxlength B. Length
C. Multiline D. None of these
Answer: A
14. …………. control is used to display text, but user cannot change it directly.
A. Textbox B. Labelbox
C. Listbox D. Commandbutton
Answer: B
Answer: C
16. In Visual Basic, a variable name cannot be more than ……… characters
A. 450 B. 255
C. 355 D. 560
Answer: B
17. We can preserve the value of a local variable by making the variable……….
A. Private B. Public
C. Static D. Implicit
Answer: C
Answer: A
Answer: A
Answer: B
Answer: A
22. All the following statements are true about variable scope except
A. Module B. Global
C. Static D. Local
Answer: C
23. The variables that does not change the value during execution of program is……
A. Numeric B. Constant
C. String D. All of the above
Answer: B
24. What is the output of the following code: MyString=”Hello World” LeftString=left(MyString,3)
A. Hel B. Hello World
C. World D. Wor
Answer: A
Answer: D
26. When the form is first referenced in any manner by program,the triggered event is….
A. Load B. Initialize
C. Activate D. None of these
Answer: B
Answer: A
28. ………….. combines the features of the text box and list box
A. Picture box B. Check box
C. Option button D. Combo box
Answer: D
29. ………property is an integer value corresponding to the position of the scroll box in the scroll bar.
A. Value B. Change
C. Visible D. None of the above
Answer: A
Answer: B
Answer: A
32. A………. displays a list of items from which user can select one or more items
A. Combo box B. List box
C. Check box D. Scroll bar
Answer: B
33. ……… is a method which moves the focus to the specified control or form
A. Setfocus B. Gotfocus
C. Lostfocus D. None of these
Answer: A
34. ……. modules can be reused in many different applications.
A. Form modules B. Class modules
C. Standard modules D. None of these
Answer: C
Answer: A
Answer: A
37. ………. property is used to return or sets a value that determines whether the control can
respond to user-generated events.
A. Autosize B. Enable
C. Visible D. Value
Answer: B
Answer: C
39. ………. shows the value of any variables within the scope of the current procedure.
A. Immediate window B. Locals window
C. Watches window D. None of these
Answer: B
40. ……….shows the property type as well as a short description of the property
A. Object box B. Description pane
C. Form layout window D. Code editor
Answer: B
Answer: A
Answer: B
Answer: C
Answer: C
45. ………… indicates whether a particular condition is on or off.
A. Combo box B. List box
C. Check box D. None of these
Answer: C
46. …………. is a group of controls that share the same name and type.
A. Fixed array B. Control array
C. Dynamic array D. Multi dimensional array
Answer: B
Answer: A
Answer: B
49. …………. allows us to control the flow of our program’s execution based on certain condition
A. Property B. Array
C. Looping D. Control structure
Answer: D
50. . …….property designates the text appearing in the form’s title bar.
A. Text B. Name
C. Caption D. None of these
Answer: C
51. The method, which loads the form into memory and displays it on screen
A. Load B. Show
C. Display D. All of these
Answer: B
Answer: C
Answer: A
Answer: B
55. The window in which the individual documents are displayed is called….. window.
A. Main B. Child
C. Parent D. All of the above
Answer: B
56. Which of the following keywords is used to keep track of active window.
A. Active B. Current
C. Me D. All of the above
Answer: C
Answer: A
58. Which window shows information that results from debugging statements in our code
A. Watch window B. Variables window
C. Locals window D. Immediate window
Answer: D
Answer: B
60. A……… is a place in the code where the program temporarily stops
A. Break B. Step over
C. Break point D. Watch
Answer: C
62. ………….loop repeats a group of statements for each item in a collection of objects or for each
element of an array.
A. For loop B. Do Until loop
C. For each loop D. Do while loop
Answer: C
Answer: B
Answer: B
Answer: B
66. ………. allows you to position the forms in your application using a small graphical representation
of the screen.
A. Debugging window B. Form designer window
C. Property window D. Form layout window
Answer: D
67. ………… is an example for control
A. Form B. Event
C. Method D. Code editor
Answer: A
Answer: B
69. ………… property is used to check whether the object is active or deactive.
A. Visible B. Enabled
C. Name D. Dragmode
Answer: B
Answer: B
Answer: A
Answer: A
74. In……….scope, variables are available only to the module in which they are declared
A. Private B. Public
C. Module D. Static
Answer: A
Answer: A
Answer: A
Answer: A
78. ……….. is a meaningful name that takes the place of a number or string that does not change
A. Variable B. Constant
C. Event D. Datatype
Answer: B
79. ……….. is a set of sequentially indexed elements having the same type of data.
A. Loop B. Array
C. Variables D. Objects
Answer: B
Answer: A
Answer: C
82. ………… statement is used to define a property procedure that assigns the value of a property
A. Property Let B. Property Get
C. Property Set D. None of these
Answer: A
83. If variables are not implicitly or explicitly type, they are assigned the type by default...............
A. Character B. Integer
C. Variant D. None of these
Answer: C
84. All the following statements are true about variable names except
A. The first character must be a letter B. They may include letters,numbers, and
underscore(_)
C. Can be any length D. You cannot use a reserved word
Answer: C
Answer: A
86. The ……allows direct exit from a forloop, Do loop,Sub procedure, or Function procedure.
A. Exit B. Exit for
C. Exit Do D. Exit Sub
Answer: A
87. If you declare an array in a module and you want every procedures to access it, then declare it
as………
A. Private B. Public
C. Private or public D. None of these
Answer: B
88. When the form is first referenced in any manner by program,the triggered event is …….
A. Load B. Initialize
C. Activate D. None of these
Answer: B
89. What properties are required to be specified for a menu item
A. Name B. Caption
C. Both (a) and (b) D. None of these
Answer: C
Answer: C
91. …………. displays the current drive and allows the user to select a different drive by using a drop
down arrow.
A. DirListBox B. DriveListBox
C. FileListBox D. All of these
Answer: B
92. ………… displays current directory with any subdirectories and allows the user to change
directory.
A. FileListBox B. DirListBox
C. DriveListBox D. Al of these
Answer: B
93. ………. displays a list of the files in the current directory or sudirectory.
A. DriveListBox B. FileListBox
C. DirListBox D. None Of these
Answer: B
Answer: B
95. To attach a scroll bar to the textbox , the property of textbox should be set to:
A. Multiline=True B. Scrollbar=True
C. SingleLine=False D. None of these
Answer: A
Answer: B
97. A………. is used to display information entered at design time, by a user at runtime ,or assigned
within the code
A. LabelBox B. TextBox
C. ListBox D. ComboBox
Answer: B
Answer: C
Answer: D
100. ……..files contains bitmaps,strings, and other data that we can change without having to reedit
and recompile the program code.
A. Class file B. Resource file
C. Forms D. None of these
Answer: B