Home

1000+ Visual Basic Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. In form load event, if the following code is written then guess what will be the output :
Dim I as integer, J as integer
I=0
J=5
While I<J
Print I
I=I+1
Wend

A. output will be 0 1 2 3 4
B. No output, blank form will be shown
C. Compiler error
D. None
Answer : B
2. In visual basic the default unit is :
A. centimeter.
B. Inch.
C. Dpi.
D. Twips .
Answer : D
3. If you want a list box control with check box option, which property of list box control you will have to change.
A. Check box property
B. Check style property
C. Style property
D. None
Answer : C
4. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
5. Visual Basic produce:
A. 3 types of executable code.
B. 2 types of executable code.
C. 4 types of executable code
D. none of the above.
Answer : B
6. Say there is a string "Ramcharan"; when someone using Mid() function like MID("Ramcharan",2) then what will be the output:
A. "Ra"
B. "Ch"
C. "Amcharan"
D. None of the above
Answer : C
7. Visual Basic has ____________ number of editions
A. 3
B. 4
C. 5
D. 6
Answer : A
8. It is possible in visual basic to specifying array limit like from 1 to 10
A. True
B. False
C.
D.
Answer : A
9. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
10. The title of the dialog box can be changed.
A. True
B. False
C.
D.
Answer : A
11. Dialog title property is used to change the title of any dialog box
A. True
B. False
C.
D.
Answer : A
12. CommonDialog1.ShowOpen
Filename1=CommonDialog1.Filename
The above code will

A. Set the filename1 by the selected filename from the common dialog contol.
B. First displays the open dialog box and let the user select any file from any
C. location and then set the filename1 by the selected filename.
D. Both are true.
Answer : B
13. which should be included when an application is used without any forms
A. subroutines
B. function
C. main
D. sub-main
Answer : D
14. What will be the output when the statements below will execute :
Dim a as integer
a=0
while(a<5)
print a
a=a+1
end

A. It will generate the output like 0 1 2 3 4
B. It will generate a runtime error
C. It will generate a compiler error
D. It will display nothing
Answer : C
15. CommonDialog control is the default control that anyone can find in the toolbar when a new project is started
A. True
B. False
C.
D.
Answer : B
16. There are _________________ no. of built in windows dialog boxes provided by common dialogs control.
A. 6
B. 7
C. 8
D. 9
Answer : A
17. DocumentForm() it is
A. A function of MDI forms
B. An array of forms using as child into MDIform
C. None of the above
D.
Answer : B
18. which control structure are working under false condition
A. do-while loop & do loop-while
B. while-wend & for loop
C. do-while loop & while wend loop
D. do-until loop & do loop-until
Answer : D
19. Instr$(text1.text,"visual") will returns :
A. No. of times the string "visual" is present in the string in text1.text.
B. It puts the control where it finds the text "visual" in the string given in text1.text.
C. First occurrence of the text "visual" within the string given in text1.text
D. None of the above.
Answer : C
20. In database application, any field does not contain any values can be recognized by:
A. Nothing value.
B. Null value.
C. Error value.
D. Empty value.
Answer : B
21. Redim statement is used to :
A. Rename a variable.
B. Rename an array.
C. Redimension an array.
D.
Answer : C
22. When using do loop-while statement then the statements within the loop body will be executed only once if the condition does not fulfilled
A. True
B. False
C.
D.
Answer : A
23. _____________ property of any control cannot change at run time.
A. color
B. name
C. caption
D.
Answer : B
24. Activate event is called before load event
A. True
B. False
C.
D.
Answer : B
25. Min and Max property can be used with Font common dialog box to determine
A. To controlling dialog box size
B. The minimum and maximum size displayed in the size list
C. None of the above
D.
Answer : B
26. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
Answer : A
27. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
28. It is possible to load a MDI form without any childform.
A. True
B. False
C.
D.
Answer : A
29. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
30. To draw a form on the screen which event is being called up
A. Draw Event
B. Load Event
C. Paint Event
D. Either i or iii
Answer : C
31. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
32. In a programme body :
Private sub form_load()
X=inputbox("First No. :")
Y=inputbox("Second No. :")
Z=val(X) +val(Y)
Print Z
End sub
What will be the output ?

A. The summation of two numbers given in two input box
B. It will show the numbers given in the input box side by side
C. It will show nothing
D. None of the above
Answer : C
33. Currency variable stores fixed point numbers with :
A. 2 decimal digits.
B. 3 decimal digits.
C. 4 decimal digits.
D. 6 decimal digits.
Answer : C
34. What is the default value of MaxLength property of text box control?
A. 255 characters
B. 10 characters
C. 0 characters
D. Any of the above
Answer : C
35. Through which property of option button control one can change the font color of the caption.
A. Back color
B. Font color
C. Fore color
D. None
Answer : C
36. It is not possible to change the back color property of option button control at run time.
A. True
B. False
C.
D.
Answer : B
37. In _______________ control you can get only drop-down list of the content but cannot add directly anything to that control.
A. text box
B. combo box
C. List Box Control
D.
Answer : C
38. A single function of visual basic takes:
A. Fixed number of parameters
B. Unlimited number of parameters
C. All of the above
D. None of the above
Answer : B
39. To run an application you have to press :
A. F3
B. F6
C. F5
D. F7
Answer : C
40. Data1.Recordset.FindFirst "State=NY"
The above code will find the record in a given database

A. Find the first record in the given database
B. Find the first record in the given database in which the state is NY.
C. The above command will find a record very fast where the state is NY
D. None of the above
Answer : B
41. cell alignment property can be used to align the cells with different alignment style
A. True
B. False
C.
D.
Answer : A
42. To get the property window in visual basic you have to press
A. F6
B. F3
C. F4
D. F5
Answer : C
43. Function Add(Num1 as integer, Num2 as integer) as integer
Add=Num1+Num2
Num1=0
Num2=0
End function
This body is an example of calling up a function by:

A. By optional argument.
B. By value.
C. By reference.
D.
Answer : C
44. The other Single Document Interface forms are by default child of MDI form when MDI form is inserted.
A. True
B. False
C.
D.
Answer : B
45. when using 'do until-loop' statement as stated below
I=10
Do until I>5
Print I
I=I+1
Loop
This statement will print

A. it will generate a run time error
B. no output will be shown
C. 10 11 12 13 14 15
D. none of the above
Answer : B
46. In visual basic Bool variable stores
A. 2 bytes
B. 1 bytes
C. 4 bytes
D. none of the above.
Answer : D
47. If the user wants to select the multiple files from file open and filesave dialog boxes then the flag must be set to
A. cdlOFNMultiselsectAllow
B. cdlOFNAllowMultiselect
C. It is not possible to select more than one file at a time
D. None
Answer : B
48. You can get a dropdown list and as well as can add some text directly to ____________ Control.
A. listbox
B. command
C. Combo Box.
D. none of this
Answer : C
49. To add the commondialog control to any project one has to include it from
A. File menu->component->Microsoft Common Dialog Control 6.0
B. Project menu->Component-> Microsoft Common Dialog Control 6.0
C. Component menu->project-> Microsoft Common Dialog Control 6.0
D. None of the above
Answer : B
50. The default startup object can not be changed in a project
A. True
B. False
C.
D.
Answer : B

Sharing is caring