Deck 8: Manipulating Strings
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
Play
Full screen (f)
Deck 8: Manipulating Strings
1
Another name for an access key is a shortcut key.
False
2
The difference between the Replace and the Mid statement is that the Mid statement will always replace a set of characters with another set of characters whereas the Replace method selectively replaces characters.
False
3
The Trim, TrimStart, and TrimEnd methods can remove one or more characters on a single instruction.
True
4
To remove characters from the beginning of a string, only the Trim method is used.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
The Trim method will remove characters from the right end of a string only.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
When there are no arguments to the Trim function, nothing is removed from the string variable.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Each menu contains a menu title that appears on the menu bar at the top of a Windows form.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The StartsWith method can check only one character starting on the left side of the string.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
Windows standards suggest that menu title captions be one word with the first letter capitalized.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Each menu element is a separate object with a set of properties including Name and Text properties.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
A menu item can be selected by pressing the menu item's shortcut key.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
The EndsWith method can check only one character starting on the right side of a string.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
In Visual Basic .NET, the Insert method is used to insert characters into a string.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
When using the IndexOf search method, to begin the search at the first character you specify a one as the argument.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
To determine the length of a string use the string's Length property.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
The first character in a string has an index of one.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
To substitute the characters contained in a string you use the Replace method.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
The method to remove characters from the left and right ends of a string is the TrimBoth method.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
When searching for value within string , if the IndexOf method does not find the value , it returns the number 0.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
The Trim function can remove only one character from a comma-separated list of characters.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
The Remove function uses an index value of zero for the first character in a string.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Which Visual Basic .NET function is used to determine if the string stateName begins with "North"?
A) FromStart
B) BeginsWith
C) StartsWith
D) TrimStart
A) FromStart
B) BeginsWith
C) StartsWith
D) TrimStart
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Which Visual Basic .NET function is used to determine if the string stateName ends with "ka"?
A) StringEnd
B) LastChar
C) Ending
D) EndsWith
A) StringEnd
B) LastChar
C) Ending
D) EndsWith
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
A menu item can have either an access key or shortcut key but not both.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
The data for salary is entered with both dollar symbol and space; which instructions will remove the dollar symbol?
A) TrimStart("$")
B) TrimLeft("$")
C) TrimEnd("$")
D) TrimRight("$")
A) TrimStart("$")
B) TrimLeft("$")
C) TrimEnd("$")
D) TrimRight("$")
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
The purpose of a separator bar is to visually group together the related items on a menu or submenu.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
To remove characters from the left, right, or within a string variable you should use the ____ function.
A) TrimStart
B) TrimEnd
C) Trim
D) Remove
A) TrimStart
B) TrimEnd
C) Trim
D) Remove
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Clicking a command on a menu opens an additional menu of options.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
To remove characters from only the beginning of a string, the method to use is the ____ method.
A) Trim
B) TrimBegin
C) TrimStart
D) TrimLeft
A) Trim
B) TrimBegin
C) TrimStart
D) TrimLeft
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
What is the result after the execution of the following code segment in Visual Basic .NET? Dim stringIn as String = "Tom Jones" Mid(stringIn, 6, 2) = "am"
A) Tam Jones
B) Tom James
C) Tom Jones
D) Tam James
A) Tam Jones
B) Tom James
C) Tom Jones
D) Tam James
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ method is used to remove the "-" characters in a variable called socialSecurity that contains the value "345-00-0000".
A) socialSecurity.Remove("-" , "")
B) socialSecurity.Replace("-" , "")
C) socialSecurity.Change("-" , "")
D) socialSecurity.Trim("-" , "")
A) socialSecurity.Remove("-" , "")
B) socialSecurity.Replace("-" , "")
C) socialSecurity.Change("-" , "")
D) socialSecurity.Trim("-" , "")
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
The data for salary is entered with both dollar symbol and space; which instructions will remove the blank space symbol?
A) TrimLeft()
B) Trim()
C) TrimEnd()
D) TrimRight()
A) TrimLeft()
B) Trim()
C) TrimEnd()
D) TrimRight()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Which of the following is an access key combination?
A) Alt + F
B) Ctrl + S
C) Shift + J
D) Tab + A
A) Alt + F
B) Ctrl + S
C) Shift + J
D) Tab + A
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Assume that a textbox named PhoneNumberTextBox appears on the form, and contains the phone number 414-555-5555. What value will display for the length of the phone number text box?
A) 10
B) 12
C) 18
D) 20
A) 10
B) 12
C) 18
D) 20
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
The StartsWith string method will return true if a match is found and false if there is no match starting on the left side of a string.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
The following instruction will remove which character from the string first? Dim myString as string = "ABCDEFGH" myString = myString.Remove(2, 3)
A) A
B) B
C) C
D) D
A) A
B) B
C) C
D) D
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Assume that the value of the string message is "Happy New Year". What value would message.IndexOf("New") yield?
A) 2
B) 6
C) 7
D) 8
A) 2
B) 6
C) 7
D) 8
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
The following instruction will remove how many characters from the string? Dim myString as string = "ABCDEFGH" myString = myString.Remove(2, 3)
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
What is the value returned from the expression stateName.Substring(1,1) when stateName contains "North Dakota"?
A) N
B) o
C) t
D) a
A) N
B) o
C) t
D) a
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
The method that removes characters from only the right end of a string is the ____ method.
A) Trim
B) TrimRight
C) TrimEnd
D) TrimR
A) Trim
B) TrimRight
C) TrimEnd
D) TrimR
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
What is the result, in stringIn, after the execution of the following code segment in Visual Basic .NET? Dim stringIn as String = "abc1234" Mid(stringIn, 3, 1) = "d"
A) abd1234
B) abd12d4
C) abcd234
D) dbc1234
A) abd1234
B) abd12d4
C) abcd234
D) dbc1234
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Each menu element is considered a(n) ____.
A) class
B) character
C) object
D) string
A) class
B) character
C) object
D) string
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
If a menu item requires additional information from the user, the Windows standard is to place a(n) ____ at the end of the menu item's caption.
A) underscore (_)
B) asterisk (*)
C) pound key (#)
D) ellipsis (…)
A) underscore (_)
B) asterisk (*)
C) pound key (#)
D) ellipsis (…)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
The ____ property of a menu element is used by a programmer to refer to the menu element in code.
A) Text
B) Name
C) Description
D) Title
A) Text
B) Name
C) Description
D) Title
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
The ____ method pads the string on the right.
A) PadEnd
B) PadRight
C) Padding
D) PadAll
A) PadEnd
B) PadRight
C) Padding
D) PadAll
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
The ____ method inserts the padded characters at the beginning of the string.
A) PadStart
B) PadRight
C) PadBegin
D) PadLeft
A) PadStart
B) PadRight
C) PadBegin
D) PadLeft
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
____ keys appear to the right of a menu item and allow you to select an item without opening the menu.
A) Shortcut
B) Access
C) Menu
D) Caption
A) Shortcut
B) Access
C) Menu
D) Caption
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
You can use the ____ method to insert characters within a string.
A) PadLeft
B) Insert
C) Trim
D) IndexOf
A) PadLeft
B) Insert
C) Trim
D) IndexOf
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
The Substring method has ____ required argument(s).
A) 0
B) 1
C) 2
D) 3
A) 0
B) 1
C) 2
D) 3
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The ____ property of a menu element stores the menu element's caption.
A) Text
B) Name
C) Title
D) Description
A) Text
B) Name
C) Title
D) Description
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck