MCQ 1
MCQ 1
a) Symantec
b) Ashton-Tate
c) Microsoft
d) Sybase
3. Which of the following extension is used to represent the project file in Visual Basic?
a) .vbp
b) .vb
c) .cls
d) .vvb
a) Char
b) Int
c) Object
d) String
5. Which of the following applications can be developed using Visual Basic tool?
6. In Visual Basic, which of the following is used for coding single-alternative and dual-
alternative selection structures?
a) Switch-Case block
b) If…Then…Else statement
c) function overloading
d) Recursion
7. What will be the output of the following Visual Basic code, If the intnumber variable
is 110?
If intnumber<=100 Then
Intnumber=intnumber*2;
Else
Intnumber=intnumber*3;
EndIf
a) 180
b) 330
c) 156
d) 270
8. In the Visual Basic application, which of the following are listed in a properties
window?
a) Items
b) Values
c) Attributes
d) Objects
a) -3043.88
b) -3034.88
c) -3408.48
d) -3304.88
10. Which of the following is commonly used to perform an immediate action when
clicked in Visual Studio?
a) Button control
b) Close
c) End
d) Exit
11. In the following Visual Basic code, what will be in msg, if str contains “visual
basic”?
Dim str as String
Dim msg as String
If str.toUpper=”VISUAL BASIC”
msg=”VB.Net”
Else
msg=”Not Visual Basic”
EndIf
a) Bye
b) Hi
c) Logical Error
d) Compiler Error
12. Which of the following displays the list of projects contained in the Visual Basic
current solution?
a) List Window
b) Project Window
c) Catalogue Window
d) Solution Explorer Window
13. Which of the following method is used to sort an array in visual basic?
a) Array.Sort()
b) Array.sortAscending()
c) Array.arrayArrange()
d) Array.arrange()
14. Which of the following is the caption part for the following Visual Basic command?
MessageBox.Show("Delete Visual Basic?","VB.Net",MessageBoxButtons.YesNo,
MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2).
a) MessageBoxButtons.YesNo
b) MessageBoxIcon.Exclamation
c) “VB.Net”
d) “Delete Visual Basic?”
15. Which of the following instruction tells the computer to close the current form in
Visual Basic?
a) This.Close()
b) Me.Close()
c) Close.this()
d) Close()
a) Defining events
b) Operations
c) Defining actions
d) Event procedures
17. What output will be returned if the following Visual Basic code is executed?
strVisualBasic = "Sanfoundry, VB.Net"
intCharIndex = strVisualBasic.IndexOf("VB")
a) 11
b) 12
c) False
d) True
18. What will be the output of the following Visual Basic code?
Dim intScores As Integer = {78, 83, 75, 90}
Array.Reverse(intScores)
a) 78,75,83,90
b) 90,75,83,78
c) 78, 83, 75,90
d) 75,78, 83,90
19. Which of the following is used to write a stream of characters in Visual Basic?
a) StreamReader object
b) StreamReader class
c) StreamWriter object
d) StreamWriter class
20. What is the value of len in the following Visual Basic code?
Dim strVB() As String = {"Sanfoundry", "Visual Basic", "VB.Net", "Visual Studio"}
Dim len As Integer
len = strVB.Length()
a) 3
b) 5
c) 4
d) 0
21. Which of the following is the default name assigned to the label control in Visual
Basic?
a) Label1
b) DefaultLabel
c) Label0
d) NewLabel
22. Which of the following toolbox is used to include an image on the Visual Basic form?
23. In visual basic language what are the rules of a programming language called?
a) Grammar
b) Order
c) Syntax
d) Rules
24. What happens when both the minimize box and maximize box property are set to
false in Visual Basic?
25. In Visual Basic, which of the following keyword tells the computer to pass the
variable’s address rather than its contents?
a) ByAdd
b) ByPoint
c) ByRef
d) ByVal
26. Which of the following forces a literal constant to assume a data type other than the
one its form indicates?
a) Any literal
b) Keyword
c) Literal type constant
d) Literal type variable
27. Which of the following is used to display a message box in Visual Basic?
a) MessageBox.Show
b) MessageBox.show
c) MessageBox
d) AlertBox.View
28. In Visual Basic, which of the following method converts a string to a number?
a) Convert
b) Tryparse
c) Extern
d) Parse
29. Which of the following is used to convert a number from one data type to another in
visual studio?
a) Literal constant
b) Object
c) Convert class
d) Parser
a) Character
b) Pure
c) Intrinsic
d) Invariable
31. The position of an item in a list box depends on which of the following property of
the value stored in the list box’s?
a) Unsorted property
b) Sorted property
c) Descending Property
d) Ascending property
32. Which of the following returns a value after performing its specific task in Visual
Basic?
a) Structure
b) Sub block
c) Sub procedure
d) Function Procedure
33. Which of the following property is used to specify a combo box’s style in Visual
Basic?
a) Style
b) ComboBoxStyle
c) DropDownStyle
d) DropStyle
34. What will be the output of the following Visual Basic code?
Dim intScores As Integer = {78, 83, 75, 90}
Array.Sort(intScores)
a) 90,83,78,75
b) 78,75,83,90
c) 78, 83, 75,90
d) 75,78, 83,90
35. Which of the following section is used to make text appear around the image?
a) Wrapping style
b) Text style
c) Image properties
d) Align