Page 1 of 1

Consider the following C++ code. What is the output? string str = "goofy"; string newStr = ""; for (int j = str.length()

Posted: Sun May 15, 2022 8:31 am
by answerhappygod
Consider The Following C Code What Is The Output String Str Goofy String Newstr For Int J Str Length 1
Consider The Following C Code What Is The Output String Str Goofy String Newstr For Int J Str Length 1 (63.79 KiB) Viewed 37 times
Consider the following C++ code. What is the output? string str = "goofy"; string newStr = ""; for (int j = str.length()-1; j >= 0; i--) newStr = newStr + stil.substr(j, 1); cout « newStr << endl; a) goofy Ob) yfoog ) O c) & g d) y