Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 12.2, Problem 12.5CP
Program Plan Intro

Inserting or deleting characters in a string:

  • Library function or modules are provided by the programming languages to perform insert and deletion operations.

Inserting:

The pseudocode library modules that are used to insert the values is :

insert (string1,position,string2)

  • The above function will insert the “string 2” to the “string1” at the “position” specified.
  • “string1” and “string2” is string
  • “Position” is an integer.

Deleting:

The pseudocode library modules that are used to insert the values is

delete (string1,start,end)

  • The above function will delete the strings that are specified from the start to the end.
  • “Start” and “End” is integer that specifies the beginning position and end position.
  • “String” is string.

Blurred answer
Students have asked these similar questions
Assume the variable name references a String object. Write an if statement that displays “Do I know you?” if the String object contains “Timothy”.
Write the first line of an if statement that calls the char.IsPuncuation method and passes the last character of a string variable named sentence as an argument.
Write a statement that declares a String variable named city. The variable should be initialized so it references an object with the string “San Francisco”.

Chapter 12 Solutions

Starting Out with Programming Logic and Design (4th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning