Deck 12: Text Processing
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/31
العب
ملء الشاشة (f)
Deck 12: Text Processing
1
If the following pseudocode were an actual program,what would it display? ??Declare String str = "a1b2c3d4"?Declare Integer index?Declare Integer num = 0?For index = 0 To length(str)- 1? If isDigit(str[index])Then? Set num = num + 1? End If?End For?Display num
A)3
B)0
C)5
D)4
E)None of the above.
A)3
B)0
C)5
D)4
E)None of the above.
D
2
Which of the following pseudocode statements uses substring notation to display the first character in a String variable named city?
A)Display city[0]
B)Display city[length - 1]
C)Display city[1]
D)All of the above
E)None of the above
A)Display city[0]
B)Display city[length - 1]
C)Display city[1]
D)All of the above
E)None of the above
A
3
If the following pseudocode were an actual program,what would it display? ??Declare String str = "a1b2c3d4"?Declare Integer index?For index = 0 To length(str)- 1? If isLetter(str[index])Then? Set str[index] = "+"? End If?End For?Display str
A)+1+2+3+4+
B)+1+2+3+4
C)1+2+3+4
D)a+b+c+d+
E)None of the above.
A)+1+2+3+4+
B)+1+2+3+4
C)1+2+3+4
D)a+b+c+d+
E)None of the above.
B
4
The insert library module automatically expands the size of the string to accommodate the inserted characters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
5
If the following pseudocode were an actual program,what would it display? ??Declare String str = "uvwxyz"?delete(str,0,0)?delete(str,0,0)
Delete(str,0,0)?Display str
A)vwxyz
B)wxyz
C)xyz
D)uvwxyz
E)None of the above.
Delete(str,0,0)?Display str
A)vwxyz
B)wxyz
C)xyz
D)uvwxyz
E)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
6
What is the output of the following pseudocode???Declare String str = "ABC"?Display str[1]
A)A
B)B
C)C
D)ABC
E)Nothing.This is an error.
A)A
B)B
C)C
D)ABC
E)Nothing.This is an error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
7
Assuming the following variable declaration,??Declare String str = "ABC"??which of the following pseudocode statements displays the last character in the string?
A)Display str[0]
B)Display str[3]
C)Display str[length(str)]
D)Display str[length(str)- 1]
E)None of the above.
A)Display str[0]
B)Display str[3]
C)Display str[length(str)]
D)Display str[length(str)- 1]
E)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
8
Assuming the following variable declaration,??Declare String str = "bot"??which of the following pseudocode statements changes the variable's contents to "robot"?
A)Set str[0] = "ro"
B)Set str = str + "ro"
C)insert(str, 0, "ro")
D)insert(str, length(str), "ro")
E)None of the above.
A)Set str[0] = "ro"
B)Set str = str + "ro"
C)insert(str, 0, "ro")
D)insert(str, length(str), "ro")
E)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
9
Most programming languages do not allow access to the individual characters in a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
10
If the following pseudocode were an actual program,what would it display? ??Declare String str = "morning"?insert(str,0,"Good")?Display str
A)Good morning
B)Goodmorning
C)Good
D)morning
E)None of the above.
A)Good morning
B)Goodmorning
C)Good
D)morning
E)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
11
Assuming the following variable declaration,??Declare String str = "Miami"??which of the following pseudocode statements changes the variable's contents to "Mia"?
A)delete(str, 3, length(str))
B)delete(str, 3, 4)
C)Set str = str - "mi"
D)Set str[0] = "Mia"
E)None of the above.
A)delete(str, 3, length(str))
B)delete(str, 3, 4)
C)Set str = str - "mi"
D)Set str[0] = "Mia"
E)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
12
The stringToReal library function accepts a Real value as an argument and returns the String equivalent of the value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
13
Assuming the following variable declaration,??Declare String str = "1234AB C"??which of the following pseudocode expressions will return True?
A)isDigit(str[3])
B)isDigit(str[4])
C)isLetter(str[3])
D)isWhiteSpace(str[7])
E)None of the above.
A)isDigit(str[3])
B)isDigit(str[4])
C)isLetter(str[3])
D)isWhiteSpace(str[7])
E)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of the following programs work extensively with text?
A)Word processors
B)Test messaging programs
C)Email applications
D)All of the above
E)None of the above
A)Word processors
B)Test messaging programs
C)Email applications
D)All of the above
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
15
The isWhiteSpace library function returns True if its argument is displayed on the screen using a white background color.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
16
Some programming tasks require that you access and/or manipulate the individual characters in a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
17
Assuming that a variable named ocean has been initialized with the string "Atlantic",which of the following library functions would return the first character in the string?
A)length(ocean)
B)toUpper(ocean)
C)substring(ocean, 0, 0);
D)contains(ocean, "A");
E)None of the above
A)length(ocean)
B)toUpper(ocean)
C)substring(ocean, 0, 0);
D)contains(ocean, "A");
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
18
The expression isDigit("9")returns True.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
19
The isUpper library function converts a character to uppercase.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
20
If the following pseudocode were an actual program,what would it display? ??Declare String str = "royal"?delete(str,0,length(str)- 3)?Display str
A)yal
B)roy
C)al
D)oya
E)None of the above.
A)yal
B)roy
C)al
D)oya
E)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
21
A ____________ character is a space,a tab,or a newline.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
22
In pseudocode you can use the _________ library function to determine whether a character is lowercase.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
23
In pseudocode you can use the _________ library module to delete specific characters from a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
24
Some programming languages allow you to access a character within a string using _________ notation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
25
When using subscript notation in most programming languages,the subscript of the last character would be one less than the string's _________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
26
In pseudocode you can use the _________ library function to determine whether a character is an alphabetic letter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
27
In pseudocode you can use the _________ library function to determine whether a character is whitespace.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
28
When using a programming language that supports subscript notation,an error will occur if you use a subscript on an ____________ String variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
29
In pseudocode you can use the _________ library module to insert a string into another string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
30
In pseudocode you can use the _________ library function to determine whether a character is uppercase.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck
31
In pseudocode you can use the _________ library function to determine whether a character is a numeric digit.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 31 في هذه المجموعة.
فتح الحزمة
k this deck