Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please give me the answer as soon as possible 1) Consider the following C++ code snippet string str- The Chegg welcome you to new world
please give me the answer as soon as possible
1) Consider the following C++ code snippet string str- "The Chegg welcome you to new world say hi!Chegg": int poslestr.find ("welcome") : int pos2 -str.find ("Chegg") int pos3 str.find( "Chegg" pos2+1) int pos4-str.find ("hi")i int pos5-str.find ("to") int pos6 str.find("you"): int pos7= str . find (" say"); string newstr -str.substr (pos3, 5): newstr+-str. substr (pos1. 7)7 newstr., str.substr (pos6, 3); newstr str.substr (pos2, 5)F newstr+str, substr (posl, 7) newstr str.subs t r (pos7, 1); newstr+ ' + str.subst r (pos 6. 3) ; newstrstr.substr (pos4, 31+newstri 5 What is the last statement prints? a) chegg welocmes you hi! b) chegg welcomes you c) welcomes to you chegg d) hi! chegg welcomes you e cStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started