• Home
  • Textbooks
  • Starting Out with Programming Logic and Design
  • Text Processing

Starting Out with Programming Logic and Design

Tony Gaddis

Chapter 12

Text Processing - all with Video Answers

Educators


Chapter Questions

01:16

Problem 1

Assume the following declaration appears in a program:
Declare String name = "Joy"
What would the following statement display?
Display name [2]

Ernest Castorena
Ernest Castorena
Numerade Educator
02:34

Problem 2

Assume the following declaration appears in a program:
Declare string str = "Tiger"
Write a statement that changes the str variable's first character to "L".

Ernest Castorena
Ernest Castorena
Numerade Educator
01:45

Problem 3

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.

Florencia Cuzmar
Florencia Cuzmar
Numerade Educator
01:45

Problem 4

Design an algorithm that determines whether the first character in the string variable str is uppercase, and if it is, changes that character to $^{*} 0^{\prime \prime}$

Florencia Cuzmar
Florencia Cuzmar
Numerade Educator
01:00

Problem 5

Assume the following declaration appears in a program:
Declare String str = "World"
Write a statement that inserts the string "Hello $=$ at the beginning of the str variable. After the statement executes, the str variable should contain the string " Hello world".

Vysakh M
Vysakh M
Numerade Educator
03:23

Problem 6

Assume the following declaration appears in a program:
Declare string city $=\cdots$ Boston
Write a statement that deletes the first three characters in the str variable.

SS
Sarvesh Somasundaram
Numerade Educator