Home

1000+ Visual Basic Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. _____________ property of any control cannot change at run time.
A. color
B. name
C. caption
D.
Answer : B
2. To get the property window in visual basic you have to press
A. F6
B. F3
C. F4
D. F5
Answer : C
3. 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
4. The title of the dialog box can be changed.
A. True
B. False
C.
D.
Answer : A
5. cell alignment property can be used to align the cells with different alignment style
A. True
B. False
C.
D.
Answer : A
6. List count property returns total number of items in list box control.
A. True
B. False
C.
D.
Answer : A
7. 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
8. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
9. IsDate() function returns true if its argument is a valid date and time
A. True
B. False
C.
D.
Answer : B
10. 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
11. It is possible to change the password character property of text box control at run time.
A. True
B. False
C.
D.
Answer : B
12. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
13. There are _________________ no. of built in windows dialog boxes provided by common dialogs control.
A. 6
B. 7
C. 8
D. 9
Answer : A
14. 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
15. Terminate is a valid event in form operation
A. True
B. False
C.
D.
Answer : A
16. 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
17. 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
18. 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
19. 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
20. 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
21. In timer control _____________ is the most important property.
A. Interval.
B. Front
C. backcolor
D.
Answer : A
22. While running an application you can change the value of any variable and see it's effect through ___________ window.
A. intermediate
B. Immediate
C. current
D.
Answer : B
23. In visual basic, number of loop control structure is _____________.
A. 4
B. 5
C. 6
D. 7
Answer : C
24. In visual basic you can draw something in
A. Picture box control.
B. Image control.
C. Shape control.
D.
Answer : A
25. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
26. Print' statement can be used to print any statement on the screen.
A. True
B. False
C.
D.
Answer : A
27. what will be the output of the code below :
private sub command_click()
dim I as integer
I=0
Do
Print I
Loop until I>10
End sub

A. it will generate compile time error
B. it will generate runtime error
C. it is an endless loop
D. 0 1 2 3 4 5 6 7 8 9 10
Answer : C
28. 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
29. Time variable is used to store date and time in visual basic
A. True
B. False
C.
D.
Answer : B
30. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
31. Delete method of the recordset of Data Control or Data Access Object is delete the record which is pointed out by the record pointer.
A. True
B. False
C.
D.
Answer : A
32. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
33. 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
34. What is the default value for multi-select property of list box control.
A. 1
B. 2
C. 0
D. none
Answer : C
35. The amount of text any one can place in text box is maximum 64 kb.
A. True
B. False
C.
D.
Answer : A
36. To run an application you have to press :
A. F3
B. F6
C. F5
D. F7
Answer : C
37. 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
38. It is possible in visual basic to specifying array limit like from 1 to 10
A. True
B. False
C.
D.
Answer : A
39. Isnull(), IsEmpty() determines weather any variable has been initialize or not
A. True
B. False
C.
D.
Answer : A
40. Suppose there are two forms; form1 and form2 ; if there are codes like : In form1.active event
Form2.show
And in form2.active event
Form1.show
Then what will be the output ?

A. Two forms will be just showed.
B. Two forms will be showed and the control will passed continuously to each other.
C. Nothing will be displayed
D. None of the above.
Answer : B
41. It is possible to declare 'Dynamic Array' in visual basic.
A. True
B. False
C.
D.
Answer : A
42. Redim statement is used to :
A. Rename a variable.
B. Rename an array.
C. Redimension an array.
D.
Answer : C
43. MDI form1.Arrange vbTileHorizontal; this code in a MDI form will
A. If there are more than one MDI form then arrange them all in horizontal manner
B. Tiles all child form in horizontal manner
C. Tiles the MDI form horizontally
D. None of the above.
Answer : B
44. If the Flag constant for the font common dialog box is cdlCFPrinterFonts then it causes the dialog box to show only the fonts supports by the printer specified by the hdc property
A. True
B. False
C.
D.
Answer : A
45. 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
46. 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
47. 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
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. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
50. 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

Sharing is caring