Home

1000+ Visual Basic Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. 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
2. Constants are processed faster than variables :
A. True
B. False
C.
D.
Answer : A
3. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
4. It is possible to build an application without using any form:
A. True
B. False
C.
D.
Answer : A
5. The maximum length of a variable is _____________ characters.
A. 255
B. 254
C. 256
D. 257
Answer : A
6. To break a loop abnormally when satisfying a condition, we can use
A. Break statement
B. Exit statement
C. Both i & ii could be used.
D. None of the above.
Answer : B
7. You can get the ASCII value of any character or number by using
A. ASC() function
B. ASCII() function
C. There is no function to get the ascii value.
D.
Answer : A
8. If there is a control array of label for 10 elements, then what will be the fifth element in the array?
A. label(5)
B. label(3)
C. label(4)
D. None
Answer : C
9. The default startup object can not be changed in a project
A. True
B. False
C.
D.
Answer : B
10. One can change or read the alignment of one or more paragraph of rich text box control through
A. Text Alignment property
B. AlignmentSet property
C. SelAlignment property
D. None
Answer : C
11. There are _________________ no. of built in windows dialog boxes provided by common dialogs control.
A. 6
B. 7
C. 8
D. 9
Answer : A
12. 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
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. CommonDialogs control is visible at runtime
A. True
B. False
C.
D.
Answer : B
15. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
16. In timer control _____________ is the most important property.
A. Interval.
B. Front
C. backcolor
D.
Answer : A
17. 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
18. The amount of text any one can place in text box is maximum 64 kb.
A. True
B. False
C.
D.
Answer : A
19. It is possible to access a menu without using mouse, to access the menu ;pressing the Ctrl key and the letter assigned to access the menu
A. True
B. False
C.
D.
Answer : B
20. The project extension name of a VB project is .vbj
A. True
B. False
C.
D.
Answer : B
21. In visual basic Bool variable stores
A. 2 bytes
B. 1 bytes
C. 4 bytes
D. none of the above.
Answer : D
22. It is possible in visual basic to specifying array limit like from 1 to 10
A. True
B. False
C.
D.
Answer : A
23. 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
24. The fundamental property of RichTextBox control is
A. Text property
B. TextRTF property
C. RTFText property
D. All of the above
Answer : C
25. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
Answer : A
26. 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
27. It is possible to insert a picture in a option button control.
A. True.
B. False
C.
D.
Answer : A
28. 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
29. It is possible to pass different number parameters to a function when call the function on different time.
A. To do this one can use in the parameter list of that function
B. paramarray keyword with the array declaration
C. argument should be passed as array
D. none of the above
Answer : B
30. Suppose there is a data control named data1. What will be the effect if the following code is inserted
A. Data1.recordset.movefirst
B. The record pointer will move to the first record of the record set
C. The pointer will move to the first record of the original table that contains the data
D. It will refresh the recordset
Answer : B
31. Redim statement is used to :
A. Rename a variable.
B. Rename an array.
C. Redimension an array.
D.
Answer : C
32. To get the property window in visual basic you have to press
A. F6
B. F3
C. F4
D. F5
Answer : C
33. 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
34. It is possible to change the password character property of text box control at run time.
A. True
B. False
C.
D.
Answer : B
35. IsDate() function returns true if its argument is a valid date and time
A. True
B. False
C.
D.
Answer : B
36. Sorted property of list box control is a design time property and cannot be changed in runtime.
A. True
B. False
C.
D.
Answer : A
37. ABS() function will generate a hole value when used with a number with fraction part (ex: 125.26598)
A. True
B. False
C.
D.
Answer : A
38. 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
39. 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
40. Visual Basic has ____________ number of editions
A. 3
B. 4
C. 5
D. 6
Answer : A
41. 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
42. 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
43. In visual basic the default unit is :
A. centimeter.
B. Inch.
C. Dpi.
D. Twips .
Answer : D
44. To run an application you have to press :
A. F3
B. F6
C. F5
D. F7
Answer : C
45. Function can return array as return value:
A. True
B. False
C.
D.
Answer : A
46. 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
47. Dialog title property is used to change the title of any dialog box
A. True
B. False
C.
D.
Answer : A
48. 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
49. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
50. Sort is a method by which elements can be sorted in flexgrid control
A. True
B. False
C.
D.
Answer : B

Sharing is caring