0% found this document useful (0 votes)
64 views6 pages

MCQ 1

Uploaded by

rajaduraicse1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views6 pages

MCQ 1

Uploaded by

rajaduraicse1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1. Who developed Visual Basic?

a) Symantec
b) Ashton-Tate
c) Microsoft
d) Sybase

2. Which of the following statement is used to define a class in visual basic?

a) Event class statement


b) Class statement
c) Form class statement
d) Event statement

3. Which of the following extension is used to represent the project file in Visual Basic?

a) .vbp
b) .vb
c) .cls
d) .vvb

4. If you keep a variable undeclared, it is automatically taken as to which of the


following data type in Visual Basic?

a) Char
b) Int
c) Object
d) String

5. Which of the following applications can be developed using Visual Basic tool?

a) Graphical User Interface


b) Real-time
c) Character User Interface
d) All of the mentioned

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

9. What will be the output of the following Visual Basic expression?


Financial.Pmt (0.05, 3, 9000)

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()

16. Object respond to an event by writing __________

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?

a) Add Image box


b) Picture Box
c) Add Picture Box
d) Image box

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?

a) Both are removed from the title bar


b) Both are disabled
c) This situation shows an exception
d) This situation shows an error

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

30. Which of the following type of constant is ControlChars.NewLine constant?

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy