What Is Text Property of a Control Review Questions
Visual Basic Multiple Selection Questions :-
1. The Visual Basic Code Editor will automatically discover certain types of errors as you are entering code.
A. True
B. False
Ans: A
2. Keywords are also referred to as reserved words.
A. True
B. False
Ans: A
iii. The divide-and-conquer-method of trouble solving breaks a problem into big, general pieces first, and so refines each piece until the problem is manageable.
A. True
B. False
Ans: A
four. Visual Basic responds to events using which of the following?
A. a code procedure
B. an effect procedure
C. a form procedure
D. a property
Ans: B
5. When the user clicks a push, _________ is triggered.
A. an effect
B. a method
C. a setting
D. a property
Ans: A
6. What property of controls tells the order they receive the focus when the tab key is pressed during run time?
A. Focus order
B. Focus number
C. Tab alphabetize
D. Control guild
Ans: C
7. Sizing Handles brand information technology very easy to resize virtually any control when developing applications with Visual Bones. When working in the Form Designer, how are these sizing handles displayed?
A. A rectangle with 4 arrows, i in each corner, around your control.
B. A 3-D outline around your control.
C. A rectangle with small squares around your control.
D. None of the above.
Ans: C
viii. The Properties window plays an of import function in the development of Visual Bones applications. It is mainly used
A.to change how objects look and feel.
B. when opening programs stored on a hard drive.
C. to let the developer to graphically design plan components.
D. to set programme related options like Program Name, Program Location, etc.
Ans: A
nine. When creating a new application in Visual Basic, you lot are asked to supply a proper name for the plan. If you do non specify a name, a default proper noun is XXXXX XXXXX is this default proper name?
A. Wapplication followed by a number.
B. Application followed by a number.
C. WindowsApplication.
D. WindowsApplication followed by a number.
Ans: C,B
10. Which of the properties in a control's list of properties is used to give the control a meaningful proper name?
A. Text
B. ContextMenu
C. ControlName
D. Name
Ans: D
11. Pseudocode is
A. data that have been encoded for security.
B. the incorrect results of a computer plan.
C. a program that doesn't work.
D. the obscure language reckoner personnel utilise when speaking.
E. a clarification of an algorithm similar to a computer language.
Ans: Eastward
12. An algorithm is divers as:
A. a mathematical formula that solves a problem.
B. a tempo for classical music played in a coda.
C. a logical sequence of steps that solve a problem.
D. a tool that designs reckoner programs and draws the user interface.
Ans: C
13. A variable declared within an event procedure is said to take local telescopic
A. True
B. Imitation
Ans: A
14. A variable declared outside of an event process is said to have class-level scope.
A. Truthful
B. False
Ans: A
15. Option Explicit requires you to declare every variable before its utilize.
A. Truthful
B. False
Ans: A
16. The value returned past InputBox is a string.
A. True
B. Faux
Ans: A
17. What is the correct statement when declaring and assigning the value of 100 to an Integer variable called numPeople
A. Dim numPeople =
B. Dim numPeople = Int(100)
C. numPeople = 100
D. Dim numPeople As Integer = 100
Ans: D
18. Which of the following arithmetic operations has the highest level of precedence?
A. + –
B. * /
C. ^ exponentiation
D. ( )
Ans: C
19. What value will be assigned to the numeric variable x when the following statement is executed? x = 2 + iii * iv
A. 20
B. 14
C. 92
D. 234
Ans: B
20. Which of the following is a valid proper noun for a variable?
A. Two_One
B. 2One
C. Ii One
D. 2.One
Ans: A
21. Keywords in Visual Basic are words that
A. should be used when naming variables.
B. are used to name controls, such as TextBox1, Command2, etc.
C. have special significant and should non exist used when naming variables.
D. are used equally prefixes for command names (such as txt, btn, lbl, and lst).
Ans: C
22. To continue a long statement on another line, apply:
A. an underscore graphic symbol.
B. an ampersand graphic symbol.
C. Ctrl + Enter.
D. a infinite followed by an underscore character.
Ans: A
23. What is the proper syntax when using a message dialog box?
A. MessageBox.Prove("Hi in that location", "Hullo")
B. MessageBox.Show(Hullo there, How-do-you-do)
C. MessageBox.Show "Hi There", "Hello"
D. MessageBox.Evidence Hello There, Hi
Ans: A
24. What volition be the output of the following argument? txtBox.Text = FormatCurrency(1234.567)
A. $1234.567
B. 1,234.57
C. $1234.57
D. $i,234.57
Ans: D
25. The following lines of code are correct. If age >= 13 And < 20 So txtOutput.Text = "You are a teenager." End If
A. True
B. False
Ans: B
26. Given that x = seven, y = two, and z = 4, the following If cake volition brandish "TRUE". If (x > y) Or (y > z) So txtBox.Text = "TRUE" End If
A. Truthful
B. Imitation
Ans: A
27. Asc("A") is 65. What is Asc("C")?
A. 66
B. 67
C. 68
D. "C"
Ans: B
28. Asc("A") is 65. What is displayed past txtBox.Text = Chr(65) & "BC"?
A. ABC
B. A BC
C. 656667
D. Not enough data is bachelor.
Ans: A
29. Which of the post-obit expressions has every bit its value the words "Hello World? surrounded past quotation marks?
A. "Hello Earth"
B. Chr(34) & "Hello World"
C. Chr(34) & Hullo Globe & Chr(34)
D. Chr(34) & "Howdy World" & Chr(34)
Ans: A
30. Which of the following is true?
A. "Cat" = "true cat"
B. "Cat" < "true cat"
C. "Cat" > "cat"
D. Relational operators are simply valid for numeric values.
Ans: B
31. Which of the post-obit is a valid Visual Bones provisional statement?
A. 2 < due north < 5
B. 2 < n Or < v
C. ii < n Or 5
D. (2 < northward) Or (n < 5)
Ans: D
32. The three chief logical operators are ________, _________, and ________.
A. And, Or, Not
B. And, Non, If
C. Or, Not, If
D. Simulated, And, Truthful
Ans: A
33. Which value for ten would brand the following status true: ten >= 5
A. x is equal to seven
B. x is equal to 5
C. ten is equal to five.001
D. all of the above
Ans: D
34. Which value for 10 would make the following condition true: Not (x >= 5)
A. x is equal to 7
B. x is equal to 4
C. x is equal to 5.001
D. ten is equal to 5.001
Ans: B
35. Which value for 10 would make the following condition true: (x >= five) And (x <= vi)
A. x is equal to 7
B. ten is equal to 5
C. 10 is equal to five.001
Ans: B,C
36. Constructs in which an If cake is contained inside another If block are called:
A. multi-If blocks
B. nested If blocks
C. sequential If blocks
D. none of the above
Ans: B
37. One may use an If cake within a Select Case block.
A. True
B. False
Ans: A
38. One may apply a Select Case block within an If block.
A. True
B. False
Ans: A
39. Select Case choices are determined by the value of an expression called a selector.
A. True
B. Simulated
Ans: A
40. Items in the value list must evaluate to a literal of the aforementioned type as the selector
A. True
B. False
Ans: A
41. A single Case statement can contain multiple values.
A. True
B. Simulated
Ans: A
42. Y'all tin specify a range of values in a Case clause by using the To keyword.
A. True
B. Faux
Ans: A
43. A variable declared inside a Select Case cake cannot exist referred to by code outside of the block.
A. True
B. False
Ans: A
44. Suppose that the selector in a Select Instance block is the string variable myVar. Which of the following is NOT a valid Case clause?
A. Instance "Adams"
B. Instance "739"
C. Instance (myVar.Substring(0, ane)
D. Case myVar.Length
Ans: D
45. Different items appearing in the same value list of a Select Instance block must be separated by a ____________.
A. semi colon
B. comma
C. colon
D. pair of quotation marks
Ans: B
46. Which Instance clause will be true whenever the value of the selector in a Select Case cake is between i and 5 or is 8?
A. Case 1 To eight
B. Example 1 To 5, viii
C. Example 1 To eight, 5
D. Case 1 To 5; 8
Ans: B
47. Which Case clause volition exist true whenever the value of the selector in a Select Case block is greater than or equal to 7?
A. Case Is >vii
B. Case Is = 8
C. Case Is >= 7
D. Example Is <= 8
Ans: C
48. What type of items are valid for use in the value list of a Case clause?
A. literals
B. variables
C. expressions
D. all of the higher up
Ans: D
49. What happens to a variable declared locally within a Sub procedure after the procedure terminates?
A. Information technology maintains its value even later the End Sub argument executes.
B. It ceases to be afterwards the End Sub statement executes.
C.It loses its value temporarily later the Cease Sub statement executes, but regains that value upon re-entry to the Sub process.
D. Information technology is reset to its default value.
Ans: B
50. Suppose a variable is passed by reference to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub procedure. What will the value of the variable be later the Sub procedure has executed?
A. It will accept the newly modified value from within the Sub procedure.
B. Its value tin can?t be determined without more information.
C. Information technology will retain the value it had before the telephone call to the Sub procedure
D. None of the in a higher place.
Ans: A
51. Suppose a variable is passed past value to a parameter of a Sub procedure, and the parameter has its value changed within the Sub process. What will the value of the variable be later on the Sub process has executed?
A. It will have the newly modified value from inside the Sub procedure.
B. Its value tin?t be adamant without more data
C. It will retain the value it had earlier the call to the Sub procedure
D. None of the in a higher place.
Ans: C
52. The proclamation argument for a class-level variable should be placed __________.
A. inside an event procedure
B. inside a general procedure
C. anywhere in the plan region, except inside a procedure
D. above the statement Public Form frmName
Ans: C
53. Variables alleged inside a procedure are said to take ________________.
A. local telescopic
B. procedure-level scope
C. form-level scope
D. none of the above
Ans: A
54. What volition exist the output of the following programme when the button is clicked?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim number As Double = 3
DoubleAndSquare(number)
txtBox.Text = CStr(number)
End Sub
Sub DoubleAndSquare(ByRef myVar Equally Double)
myVar = myVar + myVar
myVar = myVar * myVar
A. three
B. 36
C. six
D. 0
Ans: B
55. Suppose the variable myName is declared in a Dim statement in two different Sub procedures. Which statement is true?
A. The program will malfunction when information technology is executed.
B. When the value of myName is changed in one Sub process, it will also exist inverse in the other Sub procedure.
C. Visual Basic'southward smart editor will alert you lot that this is an error before the program is executed.
D. The 2 variables will exist local to their respective Sub procedures.
Ans: D
56. Which of the post-obit statements is guaranteed to pass the variable numVar past value to the Sub procedure Tally?
A. Tally(numVar)
B. Tally(ByVal numVar)
C. Tally((numVar))
D. Tally(ByVal numVar As Double)
Ans: D
57. The ______________ of a Sub procedure are vehicles for passing numbers and strings to the Sub procedure.
A. Call Statements
B. arguments
C. parameters
D. variables alleged inside
Ans: C
58. Which of the post-obit is NOT a reason for using procedures?
A. They break a circuitous problem down into smaller pieces.
B. They brand a program run faster.
C. They can be reused easily.
D. They make it possible for a squad of people to piece of work together on a single program.
Ans: B
59. Which i of the following is true near arguments and parameters?
A. Arguments announced in Call statements; parameters appear in Sub statements.
B. Parameters appear in Telephone call statements; arguments appear in Sub statements.
C. They are synonymous terms.
D. They are completely unrelated in a program.
Ans: A
60.Each individual variable in the list educatee(0), student(i), student(two) is known equally a(n)
A. subscript
B. dimension
C. element
D. type
Ans: C
62. The argument Const TAX_RATE As Doubleface=Calibri size=ii> is not valid.
A. True
B. Simulated
Ans: A
63. Part names should be suggestive of the role performed. The names also must suit to the rules for naming variables.
A. True
B. False
Ans: A
64. The input to a user-defined part can consist of 1 or more values.
A. True
B. False
Ans: A
65. Both the input and output of a Function process tin consist of several values.
A. True
B. Simulated
Ans: B
66. Suppose y'all want to write a process that takes three numbers, num1, num2, and num3; and returns their sum, product, and boilerplate. It is best to use a Function procedure for this task.
A. Truthful
B. False
Ans: B
67. Although a office can return a value, information technology cannot directly display data in a text box.
A. True
B. False
Ans: B
68. Function procedures can invoke other Function procedures.
A. True
B. Imitation
Ans: A
69. A Function may return up to two values.
A. Truthful
B. Faux
Ans: B
70. The input to a user-divers function can consist of:
A. a single value
B. one or more than values
C. no values
D. All of the above
Ans: D
71. Variables appearing in the header of a Function procedure are called ____________.
A. values of the function
B. parameters
C. coordinates
D. arguments
Ans: B
72. The arguments actualization in a Call argument must match the parameters in the appropriate Sub or Function header in all but one of the following ways. Which one?
A. Number of arguments
B. Names of arguments
C. Information type of arguments
D. Order of arguments
Ans: B
73. What volition be the output of the following program when the push button is clicked?
Individual Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim word, result As Cord
word = "Benjamin"
consequence = Rotate(discussion)
outcome = Rotate(result & word)
result = Rotate(result)
txtBox.Text = result
End Sub
Office Rotate(ByVal var As String) As String
Dim varlength As Integer
varlength = var.Length
Render var.Substring(1) & var.Substring(0, 1)
End Function
A. jaminBBenjaminen
B. BenjaminBenjamin
C. njaminBe
D. None of the above
Ans: A
74. What is displayed when the push is clicked?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim a, b every bit String
Dim x as Integer
a = "How now chocolate-brown moo-cow."
b = "brown"
x = FindIt(a, b)
txtBox.Text = CStr(x)
End Sub
Function FindIt(ByVal z1 as String, ByVal z2 as Cord) As Integer
Dim ten as Integer
ten = z1.IndexOf(z2)
End Function
"How now"
A. 8
B. 0
C. An error
D. None of the above
Ans: D
75. A Exercise While loop checks the While status before executing the statements in the loop.
A. Truthful
B. Fake
Ans: A
76. A Do?Loop Until block is always executed at least once
A. True
B. False
Ans: A
77. A counter variable is unremarkably incremented or decremented by ane.
A. Truthful
B. Imitation
Ans: A
78. The value of the control variable should not exist contradistinct within the body of a For?Next loop.
A. True
B. Simulated
Ans: B
79. The torso of a For…Next loop in Visual Bones will e'er be executed once no matter what the initial and terminating values are.
A. Truthful
B. Faux
Ans: B
80. The body of a For…Next loop in Visual Basic will always be executed in one case no matter what the initial and terminating values are. duplicate question?
A. True
B. Faux
Ans: B
VISUAL BASIC Questions and Answers pdf Download
Source: https://engineeringinterviewquestions.com/visual-basic-objective-questions-and-answers/
0 Response to "What Is Text Property of a Control Review Questions"
Post a Comment