Q267
What will be the output of the following C++ code? #include #include #include using namespace std; int main() string s = "spaces in text"; s.erase(remove(s.begin(), s.end(), ' ' ), s.end() ) ; cout << s << endl;
A.
spaces
B.
spaces in
C.
spaces in text
D.
spacesintext
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board