// A program to remove comments from a C++ program #include using namespace std; string removeComments(string prgm) { int n = prgm.length(); string res; // Flags to indicate that single line and multpile line comments // have started or not. bool s_cmt = false; bool m_cmt = false; // Traverse the given program for (int i=0; i Solution // A program to remove comments from a C++ program #include using namespace std; string removeComments(string prgm) { int n = prgm.length(); string res; // Flags to indicate that single line and multpile line comments // have started or not. bool s_cmt = false; bool m_cmt = false; // Traverse the given program for (int i=0; i.
// A program to remove comments from a C++ program #include using namespace std; string removeComments(string prgm) { int n = prgm.length(); string res; // Flags to indicate that single line and multpile line comments // have started or not. bool s_cmt = false; bool m_cmt = false; // Traverse the given program for (int i=0; i Solution // A program to remove comments from a C++ program #include using namespace std; string removeComments(string prgm) { int n = prgm.length(); string res; // Flags to indicate that single line and multpile line comments // have started or not. bool s_cmt = false; bool m_cmt = false; // Traverse the given program for (int i=0; i.