Deck 8: Manipulating Strings

ملء الشاشة (f)
exit full mode
سؤال
Another name for an access key is a shortcut key.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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.
سؤال
The Trim, TrimStart, and TrimEnd methods can remove one or more characters on a single instruction.
سؤال
To remove characters from the beginning of a string, only the Trim method is used.
سؤال
The Trim method will remove characters from the right end of a string only.
سؤال
When there are no arguments to the Trim function, nothing is removed from the string variable.
سؤال
Each menu contains a menu title that appears on the menu bar at the top of a Windows form.
سؤال
The StartsWith method can check only one character starting on the left side of the string.
سؤال
Windows standards suggest that menu title captions be one word with the first letter capitalized.
سؤال
Each menu element is a separate object with a set of properties including Name and Text properties.
سؤال
A menu item can be selected by pressing the menu item's shortcut key.
سؤال
The EndsWith method can check only one character starting on the right side of a string.
سؤال
In Visual Basic .NET, the Insert method is used to insert characters into a string.
سؤال
When using the IndexOf search method, to begin the search at the first character you specify a one as the argument.
سؤال
To determine the length of a string use the string's Length property.
سؤال
The first character in a string has an index of one.
سؤال
To substitute the characters contained in a string you use the Replace method.
سؤال
The method to remove characters from the left and right ends of a string is the TrimBoth method.
سؤال
When searching for value within string , if the IndexOf method does not find the value , it returns the number 0.
سؤال
The Trim function can remove only one character from a comma-separated list of characters.
سؤال
The Remove function uses an index value of zero for the first character in a string.
سؤال
Which Visual Basic .NET function is used to determine if the string stateName begins with "North"?

A) FromStart
B) BeginsWith
C) StartsWith
D) TrimStart
سؤال
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 menu item can have either an access key or shortcut key but not both.
سؤال
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("$")
سؤال
The purpose of a separator bar is to visually group together the related items on a menu or submenu.
سؤال
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
سؤال
Clicking a command on a menu opens an additional menu of options.
سؤال
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
سؤال
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
سؤال
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("-" , "")
سؤال
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()
سؤال
Which of the following is an access key combination?

A) Alt + F
B) Ctrl + S
C) Shift + J
D) Tab + A
سؤال
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
سؤال
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.
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
The method that removes characters from only the right end of a string is the ____ method.

A) Trim
B) TrimRight
C) TrimEnd
D) TrimR
سؤال
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
سؤال
Each menu element is considered a(n) ____.

A) class
B) character
C) object
D) string
سؤال
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 (…)
سؤال
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
سؤال
The ____ method pads the string on the right.

A) PadEnd
B) PadRight
C) Padding
D) PadAll
سؤال
The ____ method inserts the padded characters at the beginning of the string.

A) PadStart
B) PadRight
C) PadBegin
D) PadLeft
سؤال
____ 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
سؤال
You can use the ____ method to insert characters within a string.

A) PadLeft
B) Insert
C) Trim
D) IndexOf
سؤال
The Substring method has ____ required argument(s).

A) 0
B) 1
C) 2
D) 3
سؤال
The ____ property of a menu element stores the menu element's caption.

A) Text
B) Name
C) Title
D) Description
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
The Trim method will remove characters from the right end of a string only.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
When there are no arguments to the Trim function, nothing is removed from the string variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Each menu contains a menu title that appears on the menu bar at the top of a Windows form.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
The StartsWith method can check only one character starting on the left side of the string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Windows standards suggest that menu title captions be one word with the first letter capitalized.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
Each menu element is a separate object with a set of properties including Name and Text properties.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
A menu item can be selected by pressing the menu item's shortcut key.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The EndsWith method can check only one character starting on the right side of a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
In Visual Basic .NET, the Insert method is used to insert characters into a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
To determine the length of a string use the string's Length property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The first character in a string has an index of one.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
To substitute the characters contained in a string you use the Replace method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The method to remove characters from the left and right ends of a string is the TrimBoth method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
When searching for value within string , if the IndexOf method does not find the value , it returns the number 0.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The Trim function can remove only one character from a comma-separated list of characters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
The Remove function uses an index value of zero for the first character in a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
A menu item can have either an access key or shortcut key but not both.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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("$")
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
The purpose of a separator bar is to visually group together the related items on a menu or submenu.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Clicking a command on a menu opens an additional menu of options.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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("-" , "")
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
Each menu element is considered a(n) ____.

A) class
B) character
C) object
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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 (…)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The ____ method pads the string on the right.

A) PadEnd
B) PadRight
C) Padding
D) PadAll
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
The ____ method inserts the padded characters at the beginning of the string.

A) PadStart
B) PadRight
C) PadBegin
D) PadLeft
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
You can use the ____ method to insert characters within a string.

A) PadLeft
B) Insert
C) Trim
D) IndexOf
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The Substring method has ____ required argument(s).

A) 0
B) 1
C) 2
D) 3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The ____ property of a menu element stores the menu element's caption.

A) Text
B) Name
C) Title
D) Description
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.