Question: *note text.erase(0,1); is what I did wrongly suffix cC Write a function suffix that takes a char* representing a null-terminated character array (a C string),

*note text.erase(0,1); is what I did wrongly

*note text.erase(0,1); is what I did wrongly suffix cC Write a function

suffix cC Write a function suffix that takes a char* representing a null-terminated character array (a C string), and returns the string obtained by starting at the second letter. For example suffix("thug") Hint: you shouldn't be trying to create new memory locations or change the given string You're not required to check if the string is already empty. 1#include 2 using namespace std; 3 4 char suffix (char text) [ 5 6 return text.erase(0,1) 7 10 int main) 11 char* word (char*) "lion"; 12 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!