Home

Visual Basic .NET 1000+ MCQ with answer for SSC CPO

Thursday 9th of March 2023

Sharing is caring

1. To redimension an array with its previous values intact use ___________ keyword
A. RedimPreserve
B. Preserve
C. Redim
D. Redim Preserve
Answer : D
2. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
3. To override Finalize function the scope of the function must be
A. Private
B. Public
C. Protected
D. Static
Answer : C
4. You can assign a Main Menu to any control
A. True
B. False
C.
D.
Answer : B
5. Default event handler of Splitter is
A. Splitter.Click
B. Splitter.Clicked
C. Splitter.Drag
D. None of the above
Answer : D
6. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
7. When a project is Built it creates a _______ and ________ file under Bin directory
A. .exe, .sln
B. .exe, .dll
C. .dll, .sln
D. .exe, .ocx
Answer : B
8. To add controls at runtime use
A. Controls.New
B. Controls.AddNew
C. Controls.Add
D. Controls.AddItem
Answer : C
9. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
10. In HelpProvider ___________ property is used to mention the help file name
A. HelpFileName
B. FileName
C. HelpNamespace
D. Name
Answer : C
11. VB.NET supports Multi Level Inheritance
A. True
B. False
C.
D.
Answer : A
12. To make a button the default button, this property of the form must be set
A. DefaultButton
B. AcceptButton
C. DialogResult
D. None of the above
Answer : B
13. What cannot be done if the table has no primary key
A. Insert and Update
B. Update and Delete
C. Select and Delete
D. Insert and Select
Answer : B
14. Dim S as Integer=10
Text1=S
Msgbox(Text1.Text)

A. Will return error
B. Will return 10
C. Will return 0
D. Will return Null
Answer : A
15. A single LinkLabel can support multiple links
A. True
B. False
C.
D.
Answer : A
16. dim arr(10) as string,
the max index of the array is

A. 9
B. 10
C. Can be >10 also
D. None of the above
Answer : B
17. DomainUpDown control is used only for strings and NumericUpDown for numbers.
A. True
B. False
C.
D.
Answer : B
18. /*1. OleDataAdapterq1.update(DataSet1,"emp")
2. OleDataAdapterq1.update(DataSet1,"std")
3. DataSet1.Merge(DataSet1)
4. DataSet1.AcceptChanges()
/* The error is in line

A. 2
B. 4
C. 3
D. No Error
Answer : D
19. If a button click event is to be fired when the user press the 'Esc' key, set the buttons name against forms _________ property
A. DefaultButton
B. AcceptButton
C. DialogResult
D. CancelButton
Answer : D
20. A form can have only ______ Main Menu and _________ Context Menu
A. 1,1
B. 1,Multiple
C. Multiple,1
D. 1,2
Answer : B
21. If a form call another form and the caller form is closed through code, then both forms are disposed
A. True
B. False
C.
D.
Answer : A
22. If an user-defined class have a user-defined event then, the class object is declared as
A. Dim c as new ClassName
B. Dim withEvents c as new ClassName
C. Dim c as ClassName
D. Dim withEvents c as ClassName
Answer : B
23. Use a _________ statement to make Visual Basic object the default object for a set of enclosed Visual Basic statements.
A. With
B. Using
C. Import
D. Inherit
Answer : A
24. A DataSet can be updated only when the connection is open
A. True
B. False
C.
D.
Answer : B
25. If MustOverride is used then ____________ is also a must.
A. Overridable
B. Inherits
C. MustInherit
D. None of the above
Answer : C
26. To uninstall a Windows Service ____________ is use
A. Installutil -I
B. Installutil -e
C. Installutil -u
D. Installutil -d
Answer : C
27. Class cc
public _________ I as string
end class
Button1_Click
cc.I=100

A. Share
B. Shared
C. Global
D. Static
Answer : B
28. _________ and _____________ combines to make a KeyPress event
A. KeyUp, KeyDown
B. KeyEnter, KeyRelease
C. KeyDown, KeyRelease
D. KeyEnter, KeyUp
Answer : A
29. /*1. Class C
2. public mustinherit sub abc()
3. msgbox("Base Class")
4. end sub
5. end Class /* The error is in line no.

A. 1
B. 2
C. 3
D. 4
Answer : A
30. To vertically arrange all forms in an MDI form use
A. Me.Layout(MdiLayout.TileVertical)
B. Me.MdiLayout(MdiLayout.TileVertical)
C. Me.LayoutMdi(MdiLayout.TileVertical)
D. Nothing is required because default is Vertical
Answer : C
31. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
32. The SelectionMode property of a CheckedList Box can be set only to
A. One
B. MultiSimple
C. MultiExtended
D. None of the abvove
Answer : A
33. Get method is used to
A. Assign a value to an user control
B. Read value from an user control
C. Both of the above
D. None of the above
Answer : A
34. For the same class "Me" and MyBase" are same
A. True
B. False
C.
D.
Answer : A
35. Images can be loaded from
A. Images.FromFile
B. BitMap.FromFile
C. System.FromFile
D. Both a and b
Answer : D
36. The default location of the exe file of your solution is
A. ..../Project folder name
B. .../Project folder name/Bin
C. .../Project folder name/Debug
D. .../Project folder name/Debug/Bin
Answer : B
37. In ListView the item that is currently selected is determined by
A. SelectedItem
B. Item
C. FocussedItem
D. GetSelected
Answer : C
38. If a Label control's AutoSize property is set to True, can you resize the control
A. Yes
B. No
C.
D.
Answer : B
39. Only derived class can have shadows keyword
A. True
B. False
C.
D.
Answer : A
40. A MsgBox can have maximum ___________ button(s)
A. 1
B. 2
C. 3
D. 4
Answer : C
41. ___________ is used to pass copies of a variable while __________ is used to pass address of a variable.
A. Byval, Byref
B. Byref, Byval
C. Any one of the above
D. None of the above
Answer : A
42. Application.StartupPath actually points to
A. //ProjectName
B. //ProjectName/Bin
C. //ProjectName/Debug
D. //ProjectName/Bin/ProjectName.exe
Answer : B
43. In OLEDB database can be accessed without using DataSet
A. True
B. False
C.
D.
Answer : A
44. To view Panels of a StatusBar set _________ to true
A. Panel
B. Panels
C. ShowPanel
D. ShowPanels
Answer : D
45. PasswordChar property of a TextBox can accept " " (space) as the password char
A. True
B. False
C.
D.
Answer : B
46. A single OLEDBAdapter can have many DataSets
A. True
B. False
C.
D.
Answer : A
47. VB.NET does not support control arrays
A. True
B. False
C.
D.
Answer : A
48. To retrieve the default path of the project use
A. Application.Path
B. Application.DefaultPath
C. Application.StartupPath
D. Application.ProjectPath
Answer : C
49. The default event handler of TextBox is
A. KeyPress
B. Changed
C. TextChanged
D. Validating
Answer : C
50. A form can have only one default button
A. True
B. False
C.
D.
Answer : A

Sharing is caring