Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
bartleby

Videos

Textbook Question
Book Icon
Chapter 9, Problem 8E

Using the f , r , and i functions from preceding exercises, write a function called r that takes three character string arguments as follows

r

and that replaces s inside source with the character string s .The function should call

the f function to locate s inside source, then call the

r function to remove s from source, and finally call the

i function to insert s into source at the proper location.

So, the function call

r

replaces the first occurrence of the character string̎ inside the character string t , if it exists, with the string ̎ . Similarly, the function call

r

has the effect of removing the first asterisk inside the t array because the replacement string is the null string.

Blurred answer
Students have asked these similar questions
Q5. Write a function called findString to determine if one character string exists inside another string. The first argument to the function should be the character string that is to be searched and the second argument is the string you are interested in finding. If the function finds the specified string, have it return the location in the source string where the string was found. If the function does not find the string, have it return -1. For example: For function, findString ("a chatterbox", "hat") It searches the string "a chatterbox" for the string "hat". Because "hat" does exist inside the source string, the function returns Location= 3 to indicate the starting position inside the source string where "hat" was found. Programming Language :- C Note: You are not allowed to use inbuilt string library function
4 Write a program that prompts the user to input a string. The program then use the function substr to remove all the vowels from the string. For example if str = "There", then after removing all the vowels, str = "Thr". After removing all the vowels, output the string. Your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
uestion 42: Return whether a string consists of a single letter In the function below, return True if the input string parameter consists of a single uppercase letter; otherwise, return False. Most solutions would do this in two logical steps: first testing if the string consists of a single character and, second, testing whether that character is one of the uppercase letters (which can be done by seeing if it is alphabetically between A and Z, inclusive).
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
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
CPP Function Parameters | Returning Values from Functions | C++ Video Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=WqukJuBnLQU;License: Standard YouTube License, CC-BY