Question

Write a function in c++: Write a function, reverseString(string &str), that reverses the characters of the...

Write a function in c++:

Write a function, reverseString(string &str), that reverses the characters of the string str, except ignore sections of numbers starting with a 6 and extending to the next 7 (every 6 will be followed by at least one 7). Return 0 for no numbers.

string example = "Reverse";

reverseString(example),

cout << example; // prints out "esreveR"

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Write a function in c++: Write a function, reverseString(string &str), that reverses the characters of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Using C, Write a function reverse which takes a string as an argument, reverses the string...

    Using C, Write a function reverse which takes a string as an argument, reverses the string and returns the reversed string. Note; you should not return a string that you created inside the reverse function! For example: Test char str[]-"hello" printf("%s", reverse (str)); Result olleh

  • C++ Write a recursive function that reverses the given input string. No loops allowed, only use...

    C++ Write a recursive function that reverses the given input string. No loops allowed, only use recursive functions. Do not add more or change the parameters to the original function. Do not change the main program. #include <iostream> #include <string> using namespace std; //Write a recursive function 'void reverse(string &str)' that reverses the given input string. void reverse(string &str) { /*Code needed*/ } int main() {    string name = "sherry";    reverse(name);    cout << name << endl; //should...

  • Write a C++ console application that reverses an array of characters, and counts the number of:...

    Write a C++ console application that reverses an array of characters, and counts the number of:           Lower case characters (islower)           Upper case characters (isupper)           Digits (isdigit)           Other (not one of previous) Create four global variables to hold these counts. Create function void count(char input[], char reverse[]) that takes as input two arrays: one that contains characters and another that will contain the reverse of that array. The function will reverse the input array and do the...

  • 2. This question is about processing strings 2.1 [4 marks] Given a string str, we can...

    2. This question is about processing strings 2.1 [4 marks] Given a string str, we can calculate a checksum of the string by summing up the ASCII codes of the characters in the string. For example, the checksum of a string "apple" is 530, which equals to 'a' + 'p' + 'p' + 'l' + 'e' = 97 + 112 + 112 + 108 + 101. Write a function int calculate_checksum(char str[] that calculates and returns the checksum of the...

  • using c language String Challenge Have the function StringChallenge(str) read str which will contain two strings...

    using c language String Challenge Have the function StringChallenge(str) read str which will contain two strings separated by a space. The first string will consist of the following sets of characters: +, *, $, and {N} which is optional. The plus (+) character represents a single alphabetic character, the ($) character represents a number between 1-9, and the asterisk (*) represents a sequence of the same character of length 3 unless it is followed by {N} which represents how many...

  • C++ NEED HELP WITH MY REVERSE STRING FUNCTION IN LINK LIST A function Reverse, that traverses...

    C++ NEED HELP WITH MY REVERSE STRING FUNCTION IN LINK LIST A function Reverse, that traverses the linked list and prints the reverse text to the standard output, without changing the linked list. ( Pass the linked list by value, you have the freedom to create a doubly linked list that is a copy of the original list in your program before you call the function) #include "pch.h" #include <iostream> #include <string.h> #include <string> using namespace std; #define MAX 512...

  • Add or Subtract. Write a function (add-sub-string s). The function consumes a Str of even length,...

    Add or Subtract. Write a function (add-sub-string s). The function consumes a Str of even length, where every even- numbered character is either "+" or "-", and odd-valued characters are numeric The function should add up all the digits that follow a "+", and subtract all the digits that follow a "-". For example, (add-sub-string "+3+4-5") => 2 (add-sub-string "-5+3+4-6-6") - 10 => The interface file contains the function char->nat that converts a numeric Char to the corresponding numeric value....

  • using java String Challenge Have the function StringChallenge(str) read str which will contain two strings...

    Have the function wildcard(str) read str which will contain two strings separated by a space.The first string will consist of the following sets of characters: +, *, $ and {N} which is optional.The plus (+) character represents a single alphabetic character, the ($) character represents anumber between 1-9, and asterisk (*) represents a sequence of the same character of length 3unless it is followed by {N} which represents how many characters would appear in thesequence where N will be at...

  • Write a C function first_last that consumes a string argument and modifies it so that it...

    Write a C function first_last that consumes a string argument and modifies it so that it only contains two characters the first, and the last. If there are less than two characters, leave the string alone. Return nothing For example: Test Result char str[]="hello"; first_last(str) printf("%s", str); ho

  • Write a program that replace repeated three characters in a string by the character followed by 3...

    Write a program that replace repeated three characters in a string by the character followed by 3. For example, the string aabccccaaabbbbcc would become aabc3ca3b3cc. When there are more than three repeated characters, the first three characters will be replaced by the character followed by 3. You can assume the string has only lowercase letters (a-z). Your program should include the following function: void replace(char *str, char *replaced); Your program should include the following function: void replace(char *str, char *replaced);...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT