Question: abc is a string commonly found in weak passwords. Remove all occurrences of abc' from keyWord. Then, assign lengthStr wit the length of keyword. Ex.

 "abc" is a string commonly found in weak passwords. Remove all

"abc" is a string commonly found in weak passwords. Remove all occurrences of "abc' from keyWord. Then, assign lengthStr wit the length of keyword. Ex. If the input is abc57*ML>rnk Lepabc, then the output is: Remaining string: 57ML> snklep Length: 12 Note: - string. find(item) returns the index of the first occurrence of item in string. If no occurrence is found, then the function returns string n pos. - string replace(indx, num, subStr) replaces characters at indices ind x to indx+num-1 with a copy of substr. int mainO \{ string keyword; int strindex; int lengthStr; cin > keyword; strIndex =0; lengthstr =; cout "Remaining string: " keyword end: cout "Length: " lengthstr end

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!