1.
The ______ symbol is used for concatenation.
Correct Answer
A. & (ampersand)
Explanation
The ampersand symbol (&) is used for concatenation in programming. Concatenation is the process of combining two or more strings together. In many programming languages, the ampersand is used to join strings or variables together to create a new string. For example, in JavaScript, the ampersand is used with the "+" operator to concatenate strings. This allows programmers to combine different pieces of text or variables to form a single string value.
2.
If you would like to change the background color on a form, you must change the form's _____________ property.
Correct Answer
B. BackColor
Explanation
To change the background color on a form, you need to modify the form's BackColor property. This property allows you to specify the desired color for the background of the form. By changing the BackColor property, you can customize the visual appearance of the form and make it more visually appealing or suitable for your application's design.
3.
As a program runs, the insertion point can be moved from control to control. In order to reset the focus back in a text box named name textbox, you should use the code _______.
Correct Answer
A. TxtName.Focus()
Explanation
To reset the focus back to the text box named "name textbox", the correct code to use is "txtName.Focus()". This code will set the insertion point to the specified text box, allowing the user to continue typing or interacting with it. The other options, "txtName = Focus()", "txtName = Top()", and "txtName.First()", are not valid syntax and will not achieve the desired result.
4.
Which of the following statements will clear the contents of a text box named message textbox?
Correct Answer
D. All of the answers are correct
Explanation
All of the given statements will clear the contents of a text box named message textbox. The first statement `txtMessage.Text = ""` sets the text property of the textbox to an empty string, effectively clearing the contents. The second statement `txtMessage.Clear()` is a method that clears the contents of the textbox. The third statement `txtMessage.Text = String.Empty` also sets the text property to an empty string. Therefore, all of these statements will clear the contents of the textbox.
5.
Setting the TabIndex of a control to 0 (zero) will _______.
Correct Answer
D. Set the focus on this control when the program begins running
Explanation
Setting the TabIndex of a control to 0 (zero) will set the focus on this control when the program begins running.
6.
Create keyboard access on an object by ______________ in the Text property.
Correct Answer
A. Using an ampersand (&)
Explanation
To create keyboard access on an object, you can use an ampersand (&) in the Text property. This allows the user to access the object by pressing the Alt key along with the underlined letter in the object's text label. For example, if you set the Text property of a button to "Save & Exit", the user can press Alt+S to activate the button.
7.
You can vertically align a group of controls on your form by first selecting all of the controls to be aligned and then _______.
Correct Answer
D. Setting their Height property to the same value
Explanation
To vertically align a group of controls on a form, you need to select all of the controls and then set their Height property to the same value. This will ensure that all the controls have the same height, resulting in a vertically aligned group.
8.
The property used to display information in a TextBox is _______.
Correct Answer
C. Text
Explanation
The property used to display information in a TextBox is "Text". This property allows the user to input or display text in the TextBox control. It is commonly used to get or set the text content of the TextBox.
9.
Which of the following is not an object?
Correct Answer
D. All of the above are objects
Explanation
All of the options listed (Form, GroupBox, and RadioButton) are objects in programming. Objects are instances of classes that have properties and methods. They can be used to represent and manipulate data in a program. Therefore, the correct answer is that all of the options are objects.
10.
You can break a long line of code into multiple lines by ________ and then continue writing code on the next line.
Correct Answer
D. Adding a blank space and an underscore ( _ ) at the end of the line
Explanation
To break a long line of code into multiple lines, you can add a blank space and an underscore ( _ ) at the end of the line. This allows you to continue writing the code on the next line without any syntax errors.