Home

GMAT - Visual Basic 1000+ MCQ [Solved] PDF Download

Thursday 9th of March 2023

Sharing is caring

1. In visual basic Bool variable stores
A. 2 bytes
B. 1 bytes
C. 4 bytes
D. none of the above.
Answer : D
2. There are _________________ no. of built in windows dialog boxes provided by common dialogs control.
A. 6
B. 7
C. 8
D. 9
Answer : A
3. 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
4. The title of the dialog box can be changed.
A. True
B. False
C.
D.
Answer : A
5. 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
6. which should be included when an application is used without any forms
A. subroutines
B. function
C. main
D. sub-main
Answer : D
7. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
8. 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
9. IsDate() function returns true if its argument is a valid date and time
A. True
B. False
C.
D.
Answer : B
10. 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
11. In case of visual basic, IDE means :
A. Internal Database Engineering.
B. Integrated Database Environment.
C. Integrated Development Environment.
D.
Answer : C
12. It is possible to declare 'Dynamic Array' in visual basic.
A. True
B. False
C.
D.
Answer : A
13. 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
14. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
Answer : A
15. 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
16. 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
17. 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
18. List count property returns total number of items in list box control.
A. True
B. False
C.
D.
Answer : A
19. It is possible to insert a picture in a option button control.
A. True.
B. False
C.
D.
Answer : A
20. The project extension name of a VB project is .vbj
A. True
B. False
C.
D.
Answer : B
21. 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
22. It is possible to load a MDI form without any childform.
A. True
B. False
C.
D.
Answer : A
23. In visual basic 'Break' statement could be used along with "Select Case"
A. True
B. False
C.
D.
Answer : B
24. 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
25. To enable apply button in dialog box ; flag value should be set to
A. cdlCFApply
B. cdlcfTTOnly
C. cdcclHelpButton
D. None of the above
Answer : A
26. What is the default value for multi-select property of list box control.
A. 1
B. 2
C. 0
D. none
Answer : C
27. CommonDialogs control is visible at runtime
A. True
B. False
C.
D.
Answer : B
28. 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
29. 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
30. 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
31. Visual Basic has ____________ number of editions
A. 3
B. 4
C. 5
D. 6
Answer : A
32. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
33. Time variable is used to store date and time in visual basic
A. True
B. False
C.
D.
Answer : B
34. To get the property window in visual basic you have to press
A. F6
B. F3
C. F4
D. F5
Answer : C
35. 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
36. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
37. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
38. 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
39. 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
40. The amount of text any one can place in text box is maximum 64 kb.
A. True
B. False
C.
D.
Answer : A
41. 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
42. In a text box control the default caption for text box is text1.
A. True
B. False
C.
D.
Answer : B
43. cell alignment property can be used to align the cells with different alignment style
A. True
B. False
C.
D.
Answer : A
44. The maximum length of a variable is _____________ characters.
A. 255
B. 254
C. 256
D. 257
Answer : A
45. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
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. 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
48. 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
49. 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
50. Function can return array as return value:
A. True
B. False
C.
D.
Answer : A

Sharing is caring