Akisha L.

asked • 01/14/21

Programming Logic and Design

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

1 Expert Answer

By:

Patrick B. answered • 01/14/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Akisha L.

Thank you Sir :))
Report

01/14/21

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.