1. When using subscript notation to specify a character position in a string,
what are the subscripts of the first and last characters?
-
2. Design an algorithm that determines whether the first character in the
String variable str is a numeric digit, and if it is, deletes that character.
-
3. Assume the following declaration appears in a program:
Declare String city = "Boston"
Write a statement that deletes the first three characters in the str variable.
-
4. If the following pseudocode were an actual program, what would it display?
Declare String str = "Yada yada yada"
delete(str, 4, 9)
Display str
-
5. Assume the following declaration appears in a program: Declare String
name = "Joy"
What would the following statement display?
-
6. If the following pseudocode were an actual program, what would it display?
Declare String greeting = "Happy" insert(greeting, 0, "Birthday") Display
greeting
Akisha L.
Thank you Sir :))01/14/21