Home

Visual Basic MCQ Solved Paper for LSAT

Thursday 9th of March 2023

Sharing is caring

1. In a text box control the default caption for text box is text1.
A. True
B. False
C.
D.
Answer : B
2. CommonDialogs control is visible at runtime
A. True
B. False
C.
D.
Answer : B
3. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
4. Constants are processed faster than variables :
A. True
B. False
C.
D.
Answer : A
5. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
6. Sort is a method by which elements can be sorted in flexgrid control
A. True
B. False
C.
D.
Answer : B
7. The arrange property of MDI form is available at design time.
A. True
B. False
C.
D.
Answer : B
8. 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
9. 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
10. _____________ property of any control cannot change at run time.
A. color
B. name
C. caption
D.
Answer : B
11. 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
12. 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
13. 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
14. 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
15. 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
16. 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
17. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
Answer : A
18. 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
19. 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
20. 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
21. In case of visual basic, IDE means :
A. Internal Database Engineering.
B. Integrated Database Environment.
C. Integrated Development Environment.
D.
Answer : C
22. Print' statement can be used to print any statement on the screen.
A. True
B. False
C.
D.
Answer : A
23. It is possible to insert a picture in a option button control.
A. True.
B. False
C.
D.
Answer : A
24. The title of the dialog box can be changed.
A. True
B. False
C.
D.
Answer : A
25. Redim statement is used to :
A. Rename a variable.
B. Rename an array.
C. Redimension an array.
D.
Answer : C
26. 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
27. Visual Basic has ____________ number of editions
A. 3
B. 4
C. 5
D. 6
Answer : A
28. 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
29. 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
30. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
31. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
32. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
33. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
34. IsDate() function returns true if its argument is a valid date and time
A. True
B. False
C.
D.
Answer : B
35. 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
36. It is possible to change the password character property of text box control at run time.
A. True
B. False
C.
D.
Answer : B
37. 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
38. 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
39. 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
40. 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
41. In timer control _____________ is the most important property.
A. Interval.
B. Front
C. backcolor
D.
Answer : A
42. List count property returns total number of items in list box control.
A. True
B. False
C.
D.
Answer : A
43. 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
44. 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
45. In runtime it is not possible to change the form size.
A. True
B. False
C.
D.
Answer : B
46. which should be included when an application is used without any forms
A. subroutines
B. function
C. main
D. sub-main
Answer : D
47. When someone uses the code like list1.list(1); then it will return the first item of the list box control.
A. True
B. False
C.
D.
Answer : B
48. 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
49. Time variable is used to store date and time in visual basic
A. True
B. False
C.
D.
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