Home

Visual Basic 1000+ MCQ with answer for CLAT PG

Thursday 9th of March 2023

Sharing is caring

1. 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
2. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
3. 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
4. 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
5. In a text box control the default caption for text box is text1.
A. True
B. False
C.
D.
Answer : B
6. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
7. There are _________________ no. of built in windows dialog boxes provided by common dialogs control.
A. 6
B. 7
C. 8
D. 9
Answer : A
8. 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
9. Activate event is called before load event
A. True
B. False
C.
D.
Answer : B
10. 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
11. cell alignment property can be used to align the cells with different alignment style
A. True
B. False
C.
D.
Answer : A
12. 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
13. 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
14. CommonDialogs control is visible at runtime
A. True
B. False
C.
D.
Answer : B
15. 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
16. 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
17. 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
18. The default startup object can not be changed in a project
A. True
B. False
C.
D.
Answer : B
19. It is possible in visual basic to specifying array limit like from 1 to 10
A. True
B. False
C.
D.
Answer : A
20. IsDate() function returns true if its argument is a valid date and time
A. True
B. False
C.
D.
Answer : B
21. Constants are processed faster than variables :
A. True
B. False
C.
D.
Answer : A
22. 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
23. 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
24. 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
25. Dialog title property is used to change the title of any dialog box
A. True
B. False
C.
D.
Answer : A
26. 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
27. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
28. In visual basic 'Break' statement could be used along with "Select Case"
A. True
B. False
C.
D.
Answer : B
29. In visual basic Bool variable stores
A. 2 bytes
B. 1 bytes
C. 4 bytes
D. none of the above.
Answer : D
30. 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
31. Print' statement can be used to print any statement on the screen.
A. True
B. False
C.
D.
Answer : A
32. It is possible to change the shortcut key assigned to any menu for accessing within the menu editor.
A. True
B. False
C.
D.
Answer : B
33. 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
34. The fundamental property of RichTextBox control is
A. Text property
B. TextRTF property
C. RTFText property
D. All of the above
Answer : C
35. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
36. 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
37. By default 'Dim myvar' this statement:
A. allocates memory for integer variable
B. allocates memory for variant variable
C. allocates memory for Double variable
D. allocates memory for Boolean variable
Answer : B
38. 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
39. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
40. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
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. In visual basic, number of loop control structure is _____________.
A. 4
B. 5
C. 6
D. 7
Answer : C
43. It is possible to build an application without using any form:
A. True
B. False
C.
D.
Answer : A
44. 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
45. Time variable is used to store date and time in visual basic
A. True
B. False
C.
D.
Answer : B
46. Function can return array as return value:
A. True
B. False
C.
D.
Answer : A
47. _____________ property of any control cannot change at run time.
A. color
B. name
C. caption
D.
Answer : B
48. Isnull(), IsEmpty() determines weather any variable has been initialize or not
A. True
B. False
C.
D.
Answer : A
49. In timer control _____________ is the most important property.
A. Interval.
B. Front
C. backcolor
D.
Answer : A
50. 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

Sharing is caring